Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Name: arulactive
hi..
im trying "tail *" to show all the tail entries of all the files in a directory, but it doesn't work.I have tried "ls | xargs tail" and "tail `ls`" but no hope. When "head *" is working why not "tail * "

try:
tail *
*slapping myself on forhead*
I just saw that you had tried that. I'm surprised it didn't work, it should. It works fine on my OpenBSD box.
Sorry for wasting your time....

hi tvc..
that doesn't work, since tail -f is used the command doesn't finish.Anyway thanks for the hint, I just modified as below
find . -name "*" -exec tail {} \;
and it works

You're right, "tail -f" of course will wait until CTRL-C
Just "tail" is what you need indeed
But, coming back to the opening post, this should work:
ls -1 | xargs tail
Note the number "1", which means to display only the name of the file, and each on a new line (unlike "ls")

![]() |
![]() |
![]() |
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |