Re: tail for a list of files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Mar 3, 2018 at 11:31 AM, Joachim Backes
<joachim.backes@xxxxxxxxxxxxxx> wrote:
> On 03/03/18 17:15, bruce wrote:
> Hi Bruce,
>>
>> Hey..
>>
>> Trying to figure out how to do a single line cmd (it should be
>> possible right??) to do a tail -5 for a list of files???
>>
>> I thought I could combine find with exec/xargs and tail to generate
>> the list of files/tail data.. But couldn't figure out the syntax..
>>
>> thoughts??
>>
>> find /foo -name "*dog.dat ... tail -5    << obviously not correct!
>
> Indee
>
>> what would work?
>
>
> If I understood you correctly, then
>
> find /foo -name "*dog.dat"|tail -5
>
> should do the job. You forgot the pipe sign :-)
>
>
> Kind regards
>
> Joachim Backes
>
>>
>> thanks..
>> _______________________________________________
>> users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
>> To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
>>
>
>
> --
>
> Fedora release 27 (Twenty Seven)
> Kernel-4.15.7-300.fc27.x86_64
>
>
> Joachim Backes <joachim.backes@xxxxxxxxxxxxxx>
> https://www-user.rhrk.uni-kl.de/~backes/
>
> _______________________________________________
> users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx


Hi Joachim...

For a single file that works however if I want to generate the "tail"
of each file in a list of files

find /foo -name "*dog.dat" | tail -5 doesn't get the individual
files.. it gets the "tail " of the filelist.

thanks
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux