Super User is a question and answer site for computer enthusiasts and power users. 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

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.

share|improve this question
up vote 15 down vote accepted

See manpage:

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

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

share|improve this answer
2  
+1 - Goes off and aliases less to less -F – Nifle Aug 12 '10 at 8:55
1  
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 '10 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 '10 at 19:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .