Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 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
up vote 28 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.