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.

In windows, you could do a

dir | more

to scroll one page a time. How does one do this in Linux?

share|improve this question
add comment

2 Answers

up vote 15 down vote accepted

The same ls | more although most people use the ls | less command as it has more features, such as scrolling back as well as forwards, and searching for text.

To scroll forwards a screen press space. To scroll back a screen press 'b'. To search for some text type /something.

And as always man less for more details.

share|improve this answer
4  
Always remember: less is more than more, not less :) –  Traveling Tech Guy Oct 12 '10 at 7:05
    
so less is more.. I like this unixious trick –  Jokester Oct 12 '10 at 9:03
    
Great answer! After you answered, I realized that I really meant to ask this question: superuser.com/questions/198790/… –  AngryHacker Oct 12 '10 at 20:15
add comment

First, the equivalent to Windows's dir is ls (to see just file names) or ls -l (to see file names and metadata).

Often you don't need to do anything at all as most terminal environment let you scroll back a few hundreds of lines (depending on configuration) using a scroll bar or (often) with Shift+PgUp and Shift+PgDn.

If you have very long output or want to search, you can pipe into more (i.e. ls -l | more) the same way you did on Windows, but most people use less (ls -l | less), an improvement on more which gets its name from its ability to also go backwards (amongst other features). Another less common alternative to more is most.

share|improve this answer
add comment

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.