Click to See Complete Forum and Search --> : What's the Linux equivalent of DOS's dir /p command?


Giscardo
08-04-2001, 06:10 AM
When I'm browsing directories under the CLI, and I do 'ls', sometimes hundreds of files zoom by and i can only see the ones that are displayed last. I remember in dos you could type 'dir /p' and it would display the dir contents one page at at time, and you could hit enter to see the next page of the dir contents.

ronmon
08-04-2001, 06:24 AM
ls -l | less

That's a pipe (upper case backslash) between -l and less.

CP
08-04-2001, 06:40 AM
ls -la will give you details
ls |more will show it to you page by page. I always use ls -la |more, it shows file size, permissions etc. Much better

Malakin
08-04-2001, 07:46 AM
If you come up with commands you like using a lot like "ls -l | less" you can go to your $HOME/.bashrc file and at the top there should be a list of alias's, just add a line like this:
alias d="ls -l | less"
this will take effect the next time you log out and log in, then when you type "d" it will perform that command. This is quite handy :)

nathaniel
08-04-2001, 09:49 AM
a much easier option:

ls |more just to list the files/dirs then pause

NB