Mar 6 2008

The Tale of Tail (Unix Command)

Unix Tail Function

The most interesting and useful command i ever used is tail in unix. As the name indicate its duty is to show the last lines of a particular file. When take the case of log files such as error logs, always we have to know the last lines or last updations instead of reading from top to bottom or search a full text file.

for its option try this tail –help

tail -n 10 error.log

shows last 10 lines of error.log

The very interesting option is -f , means open the file and follow the last lines.

This is very useful for debugging purpose. For example if you want to check error.log lively, use this option

tail -f error.log

it displays last lines and also automatically updates when any changes happens in error.log file. So you can check other operation by tailing and following a particular file .

Try today itself. You will be very much interested, thats my guarantee :)

(There is also a similar function ‘head’, you can guess what its use, google it for more)

Regards

Sajith

1 Comments on this post

Trackbacks

  1. Anoop P Alias said:

    A very good option of tail is

    tail -f file

    This will follow the file and update any updates at the end of the file.Good if you want to watch last entries being updated on a log file :)

    March 6th, 2008 at 11:23 pm

LEAVE A COMMENT

Subscribe Form

Subscribe to Blog

Sponsors

    Itslife Online
    Advt on sajithmr.com
    Advt on sajithmr.com
    Advt on sajithmr.com

Recent Comments

  • sexasion: Best of the Best sexypicturess.blogspot.com
  • memo ezzo: live sex hot video
  • muhammadashraf44: i am ashraf from karachi i have only one girl in sex and one night plzz
  • Arun Basil Lal: Dude, The comments to this post are ever flowing in, I am gonna post some hot pics on my blog too.....
  • badar: plz send me the hot pic

Recent Readers

JOIN MY COMMUNITY!

Recent Posts