Rob, et al --

...and then Feztaa said...
% 
% Alas! Philip Mak spake thus:
% > On Tue, Feb 05, 2002 at 12:46:17AM +0800, Charles Jie wrote:
% > > 2. The 'ls' don't group directories/files into two part.
% > >    - If you code something to achieve it, you lose the COLORs.
...
% > ls -d `find * -type d -maxdepth 0`; ls `find * -type f -maxdepth 0`
% 
% Why not just do 'ls -AlF|sort'? That way all lines showing a directory
% will start with 'd', and all lines that are files will start with '-'

That's true.  Of course, you throw away the colors when you pipe the
output, IIRC...


% (also, character devices will start with 'c', block devices will start

Right.


% with 'b', and symlinks will start with 'l'). Then you get an alphabetic
% listing, it automatically puts the directories first.

No, you won't get that -- or at least not with the example above.  You'd
have to tell sort to sort on the first word and then on the 9th or 8th
(depending on whether or not you show group by default), and meanwhile
you have to figure out what to do with the "total NNNNNN" line that
usually comes first.


% 
% If you really don't like all that verbosity, you could tack on a sed
% that only shows what you want to see.

That, too.


% 
% -- 
% Rob 'Feztaa' Park
% [EMAIL PROTECTED]


:-D
-- 
David T-G                      * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/    Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

Attachment: msg24200/pgp00000.pgp
Description: PGP signature

Reply via email to