Computing.Net > Forums > Unix > how to show the tail of all files.

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

how to show the tail of all files.

Reply to Message Icon

Name: arulactive
Date: August 10, 2009 at 09:47:17 Pacific
OS: sun solaris
CPU/Ram: 12
Product: Sun microsystems Sun fire v100 550mhz/512kb l2 cache/256mb memory/1x80gb/cd-rom/lan/solaris 8, java system web server
Subcategory: General
Tags: solaris
Comment:

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 * "



Sponsored Link
Ads by Google

Response Number 1
Name: Curt R
Date: August 10, 2009 at 15:20:10 Pacific
Reply:

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....


0

Response Number 2
Name: tvc
Date: August 15, 2009 at 12:54:09 Pacific
Reply:

find . -exec tail -f {} \;


0

Response Number 3
Name: arulactive
Date: August 19, 2009 at 09:50:33 Pacific
Reply:

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


0

Response Number 4
Name: tvc
Date: August 21, 2009 at 12:48:01 Pacific
Reply:

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")


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: how to show the tail of all files.

how to identify the size of a file www.computing.net/answers/unix/how-to-identify-the-size-of-a-file-/7523.html

How To Show File www.computing.net/answers/unix/how-to-show-file/169.html

How to collect the files www.computing.net/answers/unix/how-to-collect-the-files/4840.html