Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: ls command?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ls command?



On Mon, 3 Sep 2001, Mark Robinson wrote:

> how do i list a directory's contents one page at a time?
>
> man ls did not reveal much except reordering info.

ls | more

or

ls | less

In general, you can pipe output for many non-interactive program into less
or more (same basic program) and get paged output. The | symbol is the
pipe operator. For example,

ls -l | grep xr | less

tends to be a good way to see only executable programs and directories
more often than not. grep is a little program that outputs only lines
that match a particular pattern (in this case, containing "xr"). You can
pipe things pretty much at will, but obviously, this is of limited use
for interactive programs, etc. :-))


Later,
David

---------------------------------------------------------------------
All your source are belong to us....


References: 
 >ls command? (From: Mark Robinson <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.