Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When I am viewing a log file in less is it possible to make less reload the file to get lines which were appended to that file since it was opened?

share|improve this question
add comment

2 Answers 2

up vote 4 down vote accepted

Press Shift+F (for “follow”, like in tail -f). This will start the continuous output. You can exit the continuous output display with Ctrl+C and refine or cancel your filter pattern or start a search.

From man less:

F
Scroll forward, and keep trying to read when the end of file is reached. Normally this command would be used when already at the end of the file. It is a way to monitor the tail of a file which is growing while it is being viewed. (The behavior is similar to the "tail -f" command.)

share|improve this answer
add comment

When you have opened a text file in Less, by pressing F (Shift+F), you can change to follow mode. Less will then wait for new data. You can also use less +F to start Less in follow mode.

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.