find /foo -name "*dog.dat" -ls -exec tail -f {} \; -print will list only the filename -ls will list the long dir entry. {} is needed to deliver the filename you are working with. \; is needed to signal the end of the command. On Sat, Mar 3, 2018 at 12:45 PM, Clifford Snow <clifford@xxxxxxxxxxxxxx> wrote: > Correction - I shouldn't have copy and pasted. drop the {} \; from the > script > > find /foo -name "*dog.dat" -print0 | xargs -0 tail -n5 > > On Sat, Mar 3, 2018 at 10:44 AM, Clifford Snow <clifford@xxxxxxxxxxxxxx> > wrote: >> >> >> >> On Sat, Mar 3, 2018 at 8:40 AM, bruce <badouglas@xxxxxxxxx> wrote: >>> >>> >>> 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! >>> >> For that I think you need to use xarg as: >> >> find /foo -name "*dog.dat" -print0 | xargs -0 tail -n5 {} \; >> >> >> -- >> @osm_seattle >> osm_seattle.snowandsnow.us >> OpenStreetMap: Maps with a human touch > > > > > -- > @osm_seattle > osm_seattle.snowandsnow.us > OpenStreetMap: Maps with a human touch > > _______________________________________________ > users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx > To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx > _______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx