/bin/ls sorting bug?

Oliver Fromme olli at lurza.secnetix.de
Mon Jun 21 12:36:24 GMT 2004


Valentin Nechayev <netch at ivb.nn.kiev.ua> wrote:
 >  Sun, Jun 20, 2004 at 02:34:04, andrit wrote about "Re: /bin/ls sorting bug?": 
 > > But there is nice sort command and power of unix.
 > > Don't you remember the initial UNIX concept to make miracles by small
 > > things fired together? :)
 > 
 > Well, let's disable sorting in ls output totally and give this role to sort.
 > I thinks folks won't adopt this idea, especially said that ls output
 > isn't easily machine-parseable.

That's why I've always wanted an ls flag to output the time
stamp in time_t form (i.e. seconds since the epoch).  Would
make a lot of scripts a lot easier.

(Yes, I know we've got "/usr/bin/stat -r", but that's not
portable.)

Regards
   Oliver

PS:  Don't get me wrong; I'm _not_ asking for such a flag
to ls, as it wouldn't help for portable scripts.

PPS:  FWIW, I like the patch (the second one which takes
nanoseconds correctly into account).  I would also suggest
an option to display the nanoseconds in ls -l output.
Maybe when -T is specified twice ...?  (That way we
wouldn't waste yet another letter.)

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"FreeBSD is Yoda, Linux is Luke Skywalker"
        -- Daniel C. Sobral


More information about the freebsd-hackers mailing list