ls -C considered harmful (really ls follies)

Guy Harris guy at sun.uucp
Sat Aug 17 19:37:46 AEST 1985


> Do you realize that for all the billions and billions of options hacked
> into ls, I've never seen a version of ls that can sort files based on size?
> shoe size of the programmer maybe, but never file size.... 

I have.  A certain system put out by a certain UNIX shop whose UNIX is
provided by a certain large blue personal computer manufacturer for their
personal computer and which is *not* located in a certain city in Washington
state once put out a UNIX with an "ls" that could, based on command-line
options, select any or all fields to be printed in an "ls" listing and sort
on any or all of them.  Most of the combinations were, of course, useless.
Furthermore, "ls -lt" *didn't work the way it does on EVERY OTHER UNIX
SYSTEM OUT THERE*.  They have since regretted this mistake and don't hack
their UNIXes quite so violently.

> chuq (no, DON'T do it! please! We don't NEED another option....)

Considering "ls -l | sort +3n -4" for V7/BSD systems, or "ls -l | sort +4n
-5" for S3 and S5 systems (those systems give the owner *and* group by
default on a long listing, which I find much more sensible than just giving
the owner) will do the job *quite* nicely, we certainly don't need this
option, given how infrequently this is done.

	Guy Harris



More information about the Comp.unix.wizards mailing list