C++ CSS HTML Java JavaScript MySQL Oracle PERL PHP SQL Unix VBScript XHTML XML Сети
Keep ls Output from Scrolling
 

16.7. Keep ls Output from Scrolling

Whenever I type ls

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

to pipe the output of a command to the printer:

ls -al /etc | lpr
Главная