Is there a command line option that will allow less to return to the command line if there are not sufficient lines in the file to warrant paging.

Sure I have seen it in the past but can't find the option in help.

  • To summarize the below answer's and comments: less -FX works. It produces a behavior similar to that of more for short files.
    – loxaxs
    May 29, 2017 at 10:15

1 Answer 1


See manpage:

-F or --quit-if-one-screen

Causes less to automatically exit if the entire file can be displayed on the first screen.

  • 2
    +1 - Goes off and aliases less to less -F
    – Nifle
    Aug 12, 2010 at 8:55
  • 4
    Not sure I see the point of -F by itself as (at least on my Linux) doesnt display any of the file. But combined with -X it does what I want. Thanks.
    – justintime
    Aug 12, 2010 at 15:47
  • The different behaviors are explained in this SU question and answer and even more in the blog linked from there. superuser.com/questions/134598/… fixlog.blogspot.com/2006/09/…
    – user31752
    Aug 13, 2010 at 19:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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