What if you want to view just last 100 lines of a log file? You can use tail command. Tail command is a pretty handy command to view text file.
Example :
tail -n 100 /var/log/messages
You can also use this command to view text file and it will display last line plus incoming log as it is written.
Example :
tail -f /var/log/messages
Try these examples yourself and see what is the output.
No comments:
Post a Comment