Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Jun 2004 11:47:21 -0700
From:      Tim Kientzle <kientzle@freebsd.org>
To:        Scott Mitchell <scott+freebsd@fishballoon.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: /bin/ls sorting bug?
Message-ID:  <40D48A39.30401@freebsd.org>
In-Reply-To: <20040619175007.GB462@tuatara.fishballoon.org>
References:  <20040619175007.GB462@tuatara.fishballoon.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

Tim



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40D48A39.30401>