bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "ls" spacing between columns


From: Paul Eggert
Subject: Re: "ls" spacing between columns
Date: Sun, 11 Apr 2004 22:21:30 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

"Jordan Russell" <address@hidden> writes:

> -rw-r--r--  1 123 456 5 Apr 10 18:15 test
>
> (Quick! What's the size of that file?)

Isn't there a similar problem with the old format?

-rw-r--r--    1 123      456             5 Apr 11 20:42 test

I'd guess that someone who's not familiar with the columns will be
just as confused with the old spacing as with the new.  And if you
look at more-typical output of "ls -ln" with the new spacing:

-rw-r--r--  1 1000 1000 18275 2004-04-07 22:02 diff
drwxrwxrwt  2 1000 1000  4096 2004-04-08 11:03 .esd
drwxrwxrwt  2    0    0  4096 2004-04-07 11:21 .font-unix
-rw-r--r--  1 1000 1000     0 2004-04-07 21:37 foox
srw-rw-rw-  1    0    0     0 2004-04-07 11:21 .gdm_socket
drwxrwxrwt  2    0    0  4096 2004-04-09 01:18 .ICE-unix
-rw-r--r--  1 1000 1000   381 2004-04-08 13:18 motd

it's fairly clear which column is the size, and which columns are the
uid/gids (or at least, it's as clear as it used to be....).

> I guess I fail to see what the "downside" is here.

The downside is that "ls -l" format runs out of columns too quickly.
Many people look at it in 80 (or even 79) column windows.  If we
replace this:

drwxrwxrwt  13 root   root      8192 2004-04-11 20:42 .
drwxr-xr-x  22 root   root      4096 2004-03-10 13:07 ..
-rw-r--r--   1 eggert eggert 5654447 2004-04-07 22:06 tar.bz2
-rw-------   1 eggert eggert  320296 2004-04-07 12:58 wu-ftpd-2.6.1-18a.src.rpm

with this:

drwxrwxrwt  13 root    root       8192 2004-04-11 20:42 .
drwxr-xr-x  22 root    root       4096 2004-03-10 13:07 ..
-rw-r--r--   1 eggert  eggert  5654447 2004-04-07 22:06 tar.bz2
-rw-------   1 eggert  eggert   320296 2004-04-07 12:58 
wu-ftpd-2.6.1-18a.src.rpm

then more listings will stop fitting and will become harder to read in
many environments.  It's not clear to me that the extra spaces after
"eggert" add enough to readability to be worth the cost; and if they
are worth it there, then shouldn't spaces be added elsewhere as well?

Anyway, I think Jim's suggestion of adding a general-purpose format
argument is the right way to go in the long run.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]