1 |
On Sat, 2004-04-24, 17:55:03 -0400, in <20040424215503.GC14678@××××××××××.net>, Jason Cooper <gentoo@××××××××××.net> wrote: |
2 |
> Daniel Drake (dsd@g.o) scribbled: |
3 |
> > Jason Cooper wrote: |
4 |
> > |
5 |
> > >So my question for you guys is this: Should I submit this to the |
6 |
> > >coreutils owner? It's stupid simple, literally a one-line patch. I'd |
7 |
> > >make it a command line option, but I think they left it hard-coded for a |
8 |
> > >reason... |
9 |
|
10 |
Probably the same reason programmers used two-digit years for so long. |
11 |
"This will work for now. I'll fix it later, before it becomes a |
12 |
problem." What was the largest hard drive available in 1985? Files |
13 |
larger than 95 GB were never going to happen... |
14 |
|
15 |
> > If you make your new behaviour default, you may break many peoples scripts |
16 |
> > that expect the size column to be 8 characters long. |
17 |
|
18 |
Files larger than 99999999 bytes will also break scripts which depend |
19 |
on an 8-character size column. |
20 |
|
21 |
> > My opinion is that your modification should become accessible only through |
22 |
> > a non-default commandline parameter. |
23 |
> |
24 |
> Agreed, would an "auto-adjusting width" be a worthwhile endevour? It |
25 |
> seems kind of pointless to add a commandline option just to increase the |
26 |
> column width two characters, not to mention temporary (tera/peta-byte size |
27 |
> files?). A more robust solution would be for the option to allow the |
28 |
> column width to shrink and grow based on the largest file in the list. |
29 |
|
30 |
Frankly, an "auto-adjusting width" should probably be the default. It |
31 |
should not break anything which grabs the fifth space-separated field, |
32 |
and anything which grabs characters 35 through 42 is broken, anyway. |
33 |
|
34 |
Thinking from another point of view, the output from `ls -l` is intended |
35 |
for human consumption. Robust scripts which need to determine the size |
36 |
of a file (should) use `stat -c %s`. |
37 |
|
38 |
-- |
39 |
Batou: Hey, Major... You ever hear of "human rights"? |
40 |
Kusanagi: I understand the concept, but I've never seen it in action. |
41 |
--Ghost in the Shell |