Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-05-2004, 05:42 PM
|
#1
|
Member
Registered: May 2004
Location: NYC
Distribution: Puppy Linux - it's dog-gone great!
Posts: 99
Rep:
|
How to paginate in the 'LS' command?
Ok - newbie here... But I can't seem to find any way to make the 'ls' command do a 'paginate' function. Like doing 'dir /p' in DOS. It's a way of viewing a large bunch of files a page (screen) at a time.
I know there's GOTTA be a way to do this - but I can't find it! I'm working from the Linux commandline to copy some files to floppy from the /etc folder. There are LOTS of files in /etc...
Why am I doing this? Because there's a problem with copying files to floppy from inside any GUI on my Linux box. I can only copy to floppy at the CLI right now. See my other posts for the details.
Thanks!
|
|
|
07-05-2004, 05:45 PM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
ls | less
|
|
|
07-05-2004, 07:25 PM
|
#3
|
Member
Registered: May 2004
Location: NYC
Distribution: Puppy Linux - it's dog-gone great!
Posts: 99
Original Poster
Rep:
|
Uh, close. 'ls | less' gives a 1 line at a time display in a single column. Better than nothing.
But what I want is a multiple column display, that scrolls one screen at a time. Is that possible?
|
|
|
07-05-2004, 07:38 PM
|
#4
|
Member
Registered: Jun 2004
Location: Colorado Springs, CO
Distribution: FC2
Posts: 33
Rep:
|
try `ls -C | more`
|
|
|
07-06-2004, 08:23 AM
|
#5
|
Member
Registered: May 2004
Location: NYC
Distribution: Puppy Linux - it's dog-gone great!
Posts: 99
Original Poster
Rep:
|
Tried that too. Gave me a single column of files that I could scroll down, same as the first command did.
|
|
|
07-06-2004, 08:26 AM
|
#6
|
Moderator
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
|
Try man ls - that will give you the options/switches to use with 'ls'.
|
|
|
07-06-2004, 03:13 PM
|
#7
|
Member
Registered: Apr 2003
Location: Juneau, Alaska
Posts: 251
Rep:
|
You could try ls -m | less
|
|
|
07-06-2004, 03:30 PM
|
#8
|
Member
Registered: Feb 2004
Posts: 467
Rep:
|
Quote:
Originally posted by jhecht
Uh, close. 'ls | less' gives a 1 line at a time display in a single column. Better than nothing.
But what I want is a multiple column display, that scrolls one screen at a time. Is that possible?
|
I don't understand what's wrong with the choices being given to you. 'ls | less' works just like 'dir /p'. For multiple columns, use Use:
spacebar or pagedown - to scroll down one screen
pageup - to scroll up one screen
arrow keys - to move up and down the screen
'man less' for others.
|
|
|
07-06-2004, 04:26 PM
|
#9
|
Member
Registered: Jun 2004
Location: Colorado Springs, CO
Distribution: FC2
Posts: 33
Rep:
|
|
|
|
04-13-2010, 06:16 AM
|
#10
|
LQ Newbie
Registered: Apr 2009
Posts: 1
Rep:
|
I have the same trouble!
And none of your advices doesn't work...
UPD: IT WAS ONLY LONG FILE NAMES!!!!!!!!! me lol
Last edited by MaXM00D; 04-13-2010 at 08:15 AM.
|
|
|
04-13-2010, 07:15 AM
|
#11
|
Member
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 572
Rep:
|
The output from ls is slightly odd and it seems to depend on the number of files as to how it's treated. If you do ls -C in a large directory you may see multi-column output then you do ls -C > out.txt and it will be line by line. This is on AIX 5.1.
|
|
|
All times are GMT -5. The time now is 04:26 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|