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.

I would like to open up a file using less, and have it automatically scroll the file similar to tail -f.

I know that I can do less file, and then hit Shift-F to forward forever; like tail -f.

I need less because it provides the --raw-control-chars flag, which is necessary because my input is colorful.

share|improve this question
Cheers.. with your question we have our first century. :-). sorry but i don't know the answer for you question :-). –  Hemant Aug 13 '10 at 17:45
@hemant : What do you mean? Our first century? –  Stefan Lasiewski Aug 13 '10 at 18:13
@stefan not sure why he said 'century' but he means this is question 100. –  xenoterracide Aug 13 '10 at 18:30
Questions and answers take numbers from the same pool. Hence the number does not represent the count of questions. –  txwikinger Aug 13 '10 at 18:51
I mean 100th question on unix.stackexchange.com community. In Cricket we call first 100 runs as century. Sorry for going off the topic here :-) –  Hemant Aug 13 '10 at 19:09

2 Answers 2

up vote 27 down vote accepted

use the command "F" while inside of less.

less mylogfile.txt

or, to do so automatically, use the +cmd option:

less +F mylogfile.txt
share|improve this answer

I prefer tail -F

-F - The -F option implies the -f option, but tail will also check to see if the file being followed has been renamed or rotated.

The less equivalent: less +F --follow-name

share|improve this answer

Your Answer


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.