Saturday, April 26, 2014

tail

  •   tail command example
Print the last 10 lines of a file by default.


$ tail filename.txt
Print N number of lines from the file named filename.txt
$ tail -n N filename.txt
View the content of the file in real time using tail -f. This is useful to view the log files, that keeps growing. The command can be terminated using CTRL-C.
$ tail -f log-file
 
 
 

0 comments:

Post a Comment