Reputation: 1287
If I have a directory containing hundreds of files, using ls
, ls-l
, or dir
gives me a list that's too long for the command terminal screen, so I'm unable to see most of the files in the directory.
I recall there being some argument for ls
that allows one to scroll through the list in short increments, but can't seem to find it.
Upvotes: 9
Views: 4572
Reputation: 47357
One more way is to redirect the output of ls
into a temporary file and then view that file with any editor of your choice - that way you can do searches etc. as well:
ls > res.tmp
vim res.tmp
emacs res.tmp
gedit res.tmp
grep "pattern" res.tmp
Upvotes: 0
Reputation: 674
One option is to pipe the output to less
or more
ls | less
or
ls | more
Upvotes: 10