GNU bug report logs -
#19218
Inconsistent spacing of output of "ls --full-time [file argument]"
Previous Next
Reported by: michaels <at> michaels.demon.co.uk
Date: Sat, 29 Nov 2014 19:12:02 UTC
Severity: normal
Tags: notabug
Done: Pádraig Brady <P <at> draigBrady.com>
Bug is archived. No further changes may be made.
Full log
Message #19 received at control <at> debbugs.gnu.org (full text, mbox):
tag 19218 notabug
close 19218
stop
On 29/11/14 21:14, Paul Eggert wrote:
> I don't see a bug in the cases you mention. First, 'ls' dynamically adjusts
> column widths to fit the data, and this is considered to be a feature.
Right. This is a limitation of cut, rather than anything wrong with ls.
See the awk usage at http://www.gnu.org/software/coreutils/cut
These examples might help:
ls --full-time | tr -s ' ' | cut -d' ' -f6-
ls --full-time | awk '{ print substr($0, index($0,$6)) }'
> Second, different platforms have different time stamp resolutions. The idea that
> all dates should use the same width is doomed anyway, since file time stamps can
> exceed the year 9999:
>
> $ touch -d'10000-01-01 00:00:00' far-in-future
> $ touch now
> $ ls -l --full-time
> -rw-r--r-- 1 eggert eggert 0 10000-01-01 00:00:00.000000000 -0800 far-in-future
> -rw-r--r-- 1 eggert eggert 0 2014-11-29 13:07:55.182466680 -0800 now
>
> Arguably this last example *is* a bug in 'ls', as dates should line up even when
> they're outlandish. But it's not likely to be a bug one runs into with real
> files, at least, not for another 7985 years or so.
:)
thanks,
Pádraig.
This bug report was last modified 10 years and 172 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.