[net.unix-wizards] ls -C considered harmful

chuqui@nsc.UUCP (Chuq Von Rospach) (08/13/85)

References:

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.... 

chuq (no, DON'T do it! please! We don't NEED another option....)
-- 
Chuq Von Rospach         nsc!chuqui@decwrl.ARPA
{cbosgd,fortune,hplabs,ihnp4,seismo}!nsc!chuqui

nather@utastro.UUCP (Ed Nather) (08/14/85)

> 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.... 
> 
> chuq (no, DON'T do it! please! We don't NEED another option....)
> Chuq Von Rospach         nsc!chuqui@decwrl.ARPA

Too late, chuq ...  but at least we kept it a local hack, we didn't post it
to net.everywhere.

-- 
Ed Nather
Astronomy Dept, U of Texas @ Austin
{allegra,ihnp4}!{noao,ut-sally}!utastro!nather
nather%utastro.UTEXAS@ut-sally.ARPA

gwyn@brl-tgr.ARPA (Doug Gwyn <gwyn>) (08/15/85)

> 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.... 

But there are no letters left.  Oh, maybe we can use "ls -%".  :-)

massar@think.ARPA (JP Massar) (08/15/85)

In article <3123@nsc.UUCP> chuqui@nsc.UUCP (Chuq Von Rospach) writes:
>Do you realize, I've never seen an ls that can sort files based on size?
>chuq (no, DON'T do it! please! We don't NEED another option....)

Sorry.  Really.  One day I was looking through the myriad ls options for a
way to sort by size, and well, since it wasn't there...  Perhaps I should
have taken another one out to compensate? :-)
-- 
-- JP Massar, Thinking Machines Corporation, Cambridge, MA
-- ihnp4!godot!massar, massar@think.com.arpa 
-- 617-876-1111

brent@poseidon.UUCP (Brent P. Callaghan) (08/15/85)

>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.... 

This reminded me of the file listing command of the Burroughs
large systems MCP.  It sorted filenames first on length
of name (short names first), then alphabetically.
It was surprisingly easy to locate a file given a rough idea of
its length, and it produced a pretty pattern on the screen!
-- 
				
Made in New Zealand -->		Brent Callaghan
				AT&T Information Systems, Lincroft, NJ
				{ihnp4|mtuxo|pegasus}!poseidon!brent
				(201) 576-3475

greg@ncr-sd.UUCP (Greg Noel) (08/16/85)

In article <3123@nsc.UUCP> chuqui@nsc.UUCP (Chuq Von Rospach) writes:
>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?

Well, I have.  A version of `ls' from the University of Illinois called `lz'
had an option that did that.  It also had an option that did directories
recursivly.......

I do think that it is the case that the options to `ls' are not sufficiently
orthogonal.  For example, many times I have wanted to print out just the file
size in bytes and the name, and I can't do it easily.  In retrospect, it would
have been better to have a set of options that controlled which colums were
to be printed and another set to specify which columns should be sorted.  Or
is that too obvious?
-- 
-- Greg Noel, NCR Rancho Bernardo    Greg@ncr-sd.UUCP or Greg@nosc.ARPA

barto@celerity.UUCP (David Barto) (08/16/85)

Really chuq, all you have to do is Huh? You're from the net-police?
What ?  Well he did say to not post the changes, but I had already
done them.

agk erp

THIS TRANSMISSION CANCLED BY THE NET.POLICE
-- 
David Barto, Celerity Computing, San Diego Ca, (619) 271-9940
decvax-\    bang-\			ARPA: celerity!barto@sdcsvax.ARPA
ucbvax--\   akgua-\
ihnp4----\-sdcsvax-\-celerity!barto

	"There are no moral lessons in nature" - Darwin

guy@sun.uucp (Guy Harris) (08/17/85)

> 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

guy@sun.uucp (Guy Harris) (08/19/85)

> For example, many times I have wanted to print out just the file
> size in bytes and the name, and I can't do it easily.

Again, this is easy enough to do with "sed".  Most day-to-day usage of "ls"
can be accomodated by the existing flags; everything else can be done with a
"ls" and a few tools.

	Guy Harris