Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.