Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

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.