On Sat, Mar 3, 2018 at 11:31 AM, Joachim Backes
<joachim.backes(a)rhrk.uni-kl.de> 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(a)lists.fedoraproject.org
> To unsubscribe send an email to users-leave(a)lists.fedoraproject.org
>
--
Fedora release 27 (Twenty Seven)
Kernel-4.15.7-300.fc27.x86_64
Joachim Backes <joachim.backes(a)rhrk.uni-kl.de>
https://www-user.rhrk.uni-kl.de/~backes/
_______________________________________________
users mailing list -- users(a)lists.fedoraproject.org
To unsubscribe send an email to users-leave(a)lists.fedoraproject.org
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