bug-coreutils
[Top][All Lists]
Advanced

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

Re: coreutils-0.52: Question about new ls -l output format


From: Paul Eggert
Subject: Re: coreutils-0.52: Question about new ls -l output format
Date: Wed, 10 Mar 2004 23:16:18 -0800
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (usg-unix-v)

At Wed, 10 Mar 2004 15:30:46 -0300, Marcelo Ricardo Leitner <address@hidden> 
writes:

> I got here some bash scripts that broke with this change and I'm
> wondering "why change such a thing, used for many years?".

My original motivation for proposing the patch was that ls's output
lines were getting too wide.  Part of the problem was
internationalized environments, where the dates can be quite wide in
some locales.  Part of it was the new options for file-size display,
e.g. ls -l --block-size="'1", where the file sizes get wide.

"df" is next.  (:-)

> Probably many other scripts around will broke.

No doubt, but they were all broken anyway, since there's no standard
for column widths here, and implementation behavior differs widely
even if you assume the C locale.  For example for "ls -ld":

drwxr-xr-x   41 eggert   eggert       4096 Mar 10 15:54 .  old GNU ls
drwxr-xr-x  41 eggert eggert 4096 Mar 10 15:54 .           new GNU ls
drwxr-sr-x  41 eggert   eggert      4096 Mar 10 15:54 .    Solaris 9 ls
drwxr-sr-x  41 eggert  eggert  4096 Mar 10 15:54 .         OpenBSD 3.2 ls

> I would like to know if there are plans to support the old method,

None that I know of.  It could be an option or envvar, but it'd
probably be better to generalize this so that you could specify an
arbitrary format for the line, and then mimic (say) Solaris ls if you
want.

> Or even when outputing to a pipe, not to a terminal,

It wouldn't be done that way, as that violates the GNU coding standard.
It'd be an option or an environment variable or something like that.

> Anothor issue I found is the uid/gid column align, which changes if
> the uid/gid can be converted to a username/groupname or not. ls -l
> at a nfs shared directory, used as a shared storage for misc stuff,
> got so confusing!

You're talking about this sort of thing?

drwxrwxrwt  2 eggert eggert  4096 2004-03-10 13:37 .esd
drwxrwxrwt  2 root   root    4096 2004-03-10 13:27 .font-unix
-rw-r--r--  1   9999    999     0 2004-03-10 22:59 foox
srw-rw-rw-  1 root   root       0 2004-03-10 13:27 .gdm_socket

I kind of prefer having the uid/gid numbers stick out like that.  It
makes it a bit clearer which entries are numbers and not names; I want
unusual entries to "stick out".  Right-adjusting numbers also looks
nicer when all the uid/gid entries are numbers.  It's a relatively
minor point, though.




reply via email to

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