On Sat, Mar 3, 2018 at 11:25 AM, Clifford Snow <clifford(a)snowandsnow.us> wrote:
find /foo -name "*dog.dat" -exec tail -5 {} \;
should work. You could also add various find options like -type f to make
sure its a regular file and -mtime n to get recently modified files.
On Sat, Mar 3, 2018 at 8:15 AM, bruce <badouglas(a)gmail.com> wrote:
>
> 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. but
> what would work?
>
> thanks..
> _______________________________________________
> users mailing list -- users(a)lists.fedoraproject.org
> To unsubscribe send an email to users-leave(a)lists.fedoraproject.org
--
@osm_seattle
osm_seattle.snowandsnow.us
OpenStreetMap: Maps with a human touch
_______________________________________________
users mailing list -- users(a)lists.fedoraproject.org
To unsubscribe send an email to users-leave(a)lists.fedoraproject.org
Hey Cliff!!
Thanks.. works .. but I forgot one thing...
Is there a way to list the "file" prior to the tail or would that
require a bash/shell script.. I could have sworn that I've seen how to
accomplish this a while ago... arggh!
thanks..