Unix Manuals

Quick Tips

NOTICE - New forum for all UNIX learners, users and programmers - click here

Following a file with the 'tail -f' command

Many users are aware of the UNIX® command 'tail', which can be used to display the last few lines of a large file. This can be useful for viewing log files, etc.

Even more useful in some situations, is the '-f' parameter to the 'tail' command. This causes tail to 'follow' the output of the file. Initially, the response will be the same as for 'tail' on its own - the last few lines of the file will be displayed. However, the command does not return to the prompt, and instead, continues to 'follow' the file. When additional lines are added to the file, they will be displayed on the terminal. This is very useful for watching log files, or any other file which may be appended over time. Type 'man tail' for more details on this and other tail options.


Recommended Book:

cover

Improve your UNIX skills beyond measure - we strongly recommend this excellent book.
Click the image now for more details, to read reviews, and to buy the book.


Click here for the next Quick Tip

Home


Advertise on this site. See our privacy policy.
© Copyright 2000-2010, Tom Reader, All Rights Reserved.
UNIX is a registered trademark of The Open Group in the US and other countries.
For more information on the use of the UNIX trademark, click here.
The contents of this site are not connected with or endorsed by The Open Group in any way.

If this site has helped you, please consider sending us a small donation if you can afford it - thanks!