Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a log file about 157Gb (Gnome). It's a very large file and nor gedit nor vim can open it. Alternatively I want only to see the last 20 lines and I can't back it up because of space storage limitations. Any solutions?

share|improve this question
1  
you need to use stream so it wont attempt to load full file to RAM. try tail -20 file.log to view last 20 lines. Or if you want to constantly keep track of last 20 while the new lines are added to file then use tailf file.log – mnmnc Dec 20 '12 at 11:13
    
that helped a lot. Thank you!!!!!! – hartling Dec 20 '12 at 11:21
up vote 1 down vote accepted

You need to use stream so it wont attempt to load full file to RAM.

Try command tail -20 file.log to view last 20 lines.

Or if you want to constantly keep track of last lines while the new lines are added to file then use tailf file.log

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .