[Top][All Lists]

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

Re: "ls" spacing between columns

From: Jordan Russell
Subject: Re: "ls" spacing between columns
Date: Sat, 10 Apr 2004 15:15:31 -0500

> I'm no expert, but this would not be POSIX compliant (but it could be
> done if POSIXLY_CORRECT isn't set for example), from IEE Std 1003.1
> (http://www.opengroup.org/onlinepubs/007904975/utilities/ls.html):
> ,----[ POSIX 1003.1, ls ]
> | If the -l option is specified without -L, the following information
> | shall be written:
> |
> | "%s %u %s %s %u %s %s\n", <file mode>, <number of links>,
> |     <owner name>, <group name>, <number of bytes in the file>,
> |     <date and time>, <pathname>
> `----
> And to be a real nitpicker, there should be only one space between the
> <file mode> and <number of links> filed from GNU ls if one should
> follow POSIX stricly...

I'm no expert either, but I certainly don't believe that format string is
intended to be used literally. If it were, then right-justifying the file
size column, for example, would be prohibited. Also, it couldn't line up the
user/group columns in cases where the user/group names differ in length.

So to me it seems they're only trying to show the order of the columns, not
the exact amount of space in between them.

Jordan Russell

reply via email to

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