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.

This must've been done before: I want to keep a log file open in terminal so I can monitor updates to it as they occur. My searches are coming up with everything but this situation... I must be missing some terminology or something key, because people do this all the time inside of other programs (NetBeans, or rails server, for example).

share|improve this question
    
Ah, I've found it. tail -f myfile.log. That does it nicely. I love linux. –  wulftone May 20 '11 at 19:23

2 Answers 2

up vote 21 down vote accepted

Try with:

tail -f your.log

where -f stands for follow.

share|improve this answer

Another way:

watch tail -n20 your.log

OK, kind of a silly use of watch - but you might find the watch command useful for other things.

share|improve this answer
4  
The watch option is better for files that are going to be renamed/removed and recreated (either by normal operation or by something like logrotate) during the time you are watching, otherwise tail -f is more efficient. –  David Spillett May 20 '11 at 20:07
4  
@David: tail -F handles that. –  grawity May 21 '11 at 10:11
    
@grawity: Thanks, you learn something new every day! –  David Spillett May 21 '11 at 11:25

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.