//View Tip #820
Similar Tips
There are no more tips with these tags. Perhaps you'd like to submit one, or browse the archives.


Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
Here are a couple of ways to follow additions to a log file.

tail -f

This tails the log file and the '-f' tells tail to follow the file, so anything new added to the file will also be printed to the screen.

Another option is:

less +F /var/log/messages

The +F option turns on less 'follow mode'. It is similar to tail -f but you will have the benefits of less, like scrolling up and down. To stop tailing, use Ctrl-C and to resume it, press Shift-F.

View Comments »


Add your comment

Comments are currently disabled
"tail -F" is even better, and will do the right thing if the log file gets renamed or rotated as sometimes happens if you're watching a system log file.
Posted 2009-05-26 09:22:24

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit