|
CentOS Linux Server Guide |
Displaying the end of file in CentOS Linux |
||||
Tail command is used to display the last few lines of a file.
Name tail
Synopsis tail filename(s)tail -n filename(s)tail +n filename(s)
Note: -n option is number of lines that you want to display +n option is to display a file starting at the X of lines
Scenario A In the following example, the tail command (without using any option) will displaying the last 10 lines of the mail.log
Scenario B In the following example, the tail -20 will displaying the last 20 lines of mail.log
Scenario C In the following example, we are display from the 60th lines of mail.log
Scenario D In the following example, we are combining tail and head function. We are displaying 5 lines start from 10th line.
|
||||
|
Copyright 2011 http://www.1a-centosserver.com All Rights Reserved All trademarks are the property of their respective owners. Contact Us | Terms of Use | Privacy Policy |