Sign in to follow this  
Followers 0

HPR - HPR1042: LiTS: 012 - tail

1 post in this topic

The tail command is used to print out the last 10 lines of a file to standard out. This command is a staple in a system administrator’s tool kit and especially handy when monitoring log files. The basic syntax is:tail some_fileWhich will output the last 10 lines of the file. You can alter then number of lines with the -n, or –lines=, flag:tail -n20 some_filetail –lines=20 some_fileIn some versions of tail you can get away with specifying the number of lines from the end with just a “-” and number:tail -30 some_fileInstead of working backwards with the -n command you can specify a “+” and some number to start from that number and list the contents to the end:tail -n+30 some_fileThis will display the contents of some_file from line 30 to the end of the file.For the complete write up including video please go to

Go to this episode


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0