5/25/2013

Linux: How can I page output of results? Stop long lists of filenames, text read out?

The way to make long lists of output easier to read on screen, is to pipe the result to the  "more" command.
ex.
myRequest | more
In the real world you might want a detailed list of the contents of a directory that has a lot of files. You could use:
ls -la | more
At the bottom of the screen you'll probably see an indicator in reverse color, that reads "--More--".

To see the next line, you can hit the [Enter] key on your keyboard.

To see the next page of results, you can hit the [Spacebar] on your keyboard.

To stop the list from displaying further, or to break out of the command, you can hold [Ctrl] key and hit [C].

No comments :

Post a Comment