I am looking for a simple command to display files in multiple pages at the screen. I tried "ls | more", and it didn't work. Any suggestion?
Thanks.
I am looking for a simple command to display files in multiple pages at the screen. I tried "ls | more", and it didn't work. Any suggestion?
Thanks.
what do you mean exactly by "it did not work" ?
ls | more
exactly does what you want. It lists all the files and if there is more than a screenfull, then it waits for you to press a key to show the rest.
ls | less
works better, press the up arrow and you scroll up, down goes down and press the space bar goes to the next contents to fill the whole terminal window
jnvilo wrote:
what do you mean exactly by "it did not work" ?
ls | more
exactly does what you want. It lists all the files and if there is more than a screenfull, then it waits for you to press a key to show the rest.
ls | less
works better, press the up arrow and you scroll up, down goes down and press the space bar goes to the next contents to fill the whole terminal window
When I sent out "ls | more", only the first page was shown. Press "Enter" or "Space" won't move into the next page.
Maybe you run in ls | more in the directory with a few files content, thats why is doesnt need to divide the list on many pages.
try this you will get what you want.
ls /etc | more
The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.
Join / Linux Training / Board