How To Display Show Get Last 10 Lines From A File In Linux Shell Command

RegisterLogin
How To Display Show Get Last 10 Lines From A File In Linux Shell Command
Post Description: How To Display Show Get Last 10 Lines From A File In Linux Shell Command
Tags: How, To, Display, Show, Get, Last, 10, Lines, From, A, File, In, Linux, Shell, Command
This Post Was Posted On Feb 29, 2008 By web hosting #824
i had a very large file in my linux dedicated server i leased from www.webune.com and i wanted to see what were the last list, it was an error log file and it was huge, but opening would mean i would have to wait a while just to see the last lines. well, linux being such a wonderful operating system, it has the tail command so to see the last 10 lines on my error log file all i had to do is send this command in the linux shell and it would get and show me the last ten lines:


     Code:
tail error_log.txt


hey wait a minute, what about if you wanted to display the last 15 lines?
well you can do that with tail: this is how you would display them:


     Code:
tail -15 error_log.txt


you can change 15 to whatever number of lines you want
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
©2011 Webune Forums - Sun Dec 18, 2011 3:20 pm
Powered by: Webune Forums V3