/bin/ls sorting bug?
kientzle at freebsd.org
Sat Jun 19 18:47:39 GMT 2004
Scott Mitchell wrote:
> ls(1) says that the -t option will:
> Sort by time modified (most recently modified first) before sort-
> ing the operands by lexicographical order.
> ... the attached patch produces the expected output. I can commit it if there
> are no objections.
Looks good to me. I wonder if the time sorting should
include the nanos field as well. (Mostly on FreeBSD,
the nanos field is zero, but not always.)
Of course, sorting on the (non-displayed) nanos field
could also produce such unexpected output as you describe.
More information about the freebsd-hackers