Cheap domain hosting, cheap domain names & web page promotion services
  

 Home

Red Hat Linux 9: Red Hat Linux Getting Started Guide
PrevChapter 16. Frequently Asked QuestionsNext

16.7. Keep ls Output from Scrolling

Whenever I type ls I can barely see the output of the directory because it scrolls by too quickly. How can I actually read the output?

To prevent the output of ls from scrolling by too quickly, pipe the output to a utility such as less or more. You will then be able to see the output one screen, or "page" at at time.

To read the contents of /etc with less, type the following command at the shell prompt:

ls -al /etc | less

To move forward a screen, press [Space] bar; to move back a screen, press the [b] key; to quit, press [q].

You can achieve the same results with more, another paging utility.

16.7.1. Printing ls Output

You can also print directory listings by piping the output to a printer in the same way that you piped the output to your screen. If you have configured a printer, type the following to pipe the output of a command to the printer:

ls -al /etc | lpr

PrevHomeNext
Tips on Using Command HistoryUpForgotten Password
 

 

 

 
 

Disclaimer: For authoritative source or latest update to this documentation, please refer to http://www.redhat.com/docs/manuals/linux/

 

 
Quotes: What we call happiness in the strictest sense comes from the (preferably sudden) satisfaction of needs which have been dammed up to a high degree.Illusions commend themselves to us because they save us pain and allow us to enjoy pleasure instead. We must therefore accept it without complaint when they sometimes collide with a bit of reality against which they are dashed to pieces.