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

Mobile
feeds
Welcome Login | Register

How To Display Show Get Last 10 Lines From A File In Linux Shell Command
  Forums Index
      » Linux Hosting Forums
        » » How To Display Show Get Last 10 Lines From A File In Linux Shell Command



How To Display Show Get Last 10 Lines From A File In Linux Shell Command
Post Description:
Post Tags: how, to, display, show, get, last, 10, lines, from, a, file, in, linux, shell, command, linux hosting, troubleshoot, help, support advise, questions, answers
This Post Has Been Viewed 1692 Times Since Fri Mar 02, 2007 11:47 am Posted By hostman with 1 replies
How To Display Show Get Last 10 Lines From A File In Linux Shell Command
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






Share
URL:
You can use this HTML code to put it on your website to show your friends this wallpaper. Use this code on your profile like myspace, friendster, Facebook or others. Just Copy and Paste it in your HTML on your websites



Fourms BBCODE:
BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums





Comments and replies About How To Display Show Get Last 10 Lines From A File In Linux Shell Command




:: 1 :: Reply #83367 Reply By sundar On Thu Nov 27, 2008 2:38 am
thanks,
that was helpful.