Date: Mon, 21 Jun 2004 09:30:03 -0400 From: Leo Bicknell <bicknell@ufp.org> To: freebsd-hackers@freebsd.org Subject: Re: /bin/ls sorting bug? Message-ID: <20040621133003.GA96338@ussenterprise.ufp.org> In-Reply-To: <20040621091649.GA92422@iconoplex.co.uk> References: <20040621054406.GA927@VARK.homeunix.com> <200406210910.aa18808@salmon.maths.tcd.ie> <20040621091649.GA92422@iconoplex.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
--vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In a message written on Mon, Jun 21, 2004 at 10:16:49AM +0100, Paul Robinso= n wrote: > For what it's worth the original patch looked good to me. The nanosecond= =20 > patch is fine too. Please, no more intimate discussion of a command line= =20 I'd like to put forth a different argument why the nanosecond patch is a better patch. While I think the particular sort order (current behavior vrs non nano patch vrs nano patch) is largely unimportant, I think consistency is very important. It's quite common to do things like using diff on the output of commands like ls (indeed, I think several of the built in periodic scripts to this), and for that having a _reproduceable_ order is important. Since today, for almost all users nanos is 0 there's no impact on most of the users. For the few users where nanos isn't 0, the impact is that if we do the non-nanos patch now, and then at some point in the future add the nanos patch, at that transition old and new ls will produce different output for the nanos users. So, if we're going to alter the output and make people look at their diffs (or whatever) once with puzzlement, we should make sure it's only once. Put another way, the man page says: -t Sort by time modified (most recently modified first) before so= rt- ing the operands by lexicographical order. Since it doesn't have a resolution, if I was a nanos user and it didn't sort by nanos, I'd be a bit annoyed. Having -t work correctly is the right option. The fact that there is no way to display nanos is a separate bug. Don't let the existance of one bug prevent you =66rom fixing another one. Note, I advocate -T display nanos. Humm, I didn't want to debate command line options (as the parent suggested) but I put two in my post. Can't win 'em all. --=20 Leo Bicknell - bicknell@ufp.org - CCIE 3440 PGP keys at http://www.ufp.org/~bicknell/ Read TMBG List - tmbg-list-request@tmbg.org, www.tmbg.org --vtzGhvizbBRQ85DL Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA1uLbNh6mMG5yMTYRAlazAJ9D7yfXTeO9czqfmsMVJlrj5S6f8ACfQp02 C1D6TQgm+NxSsfavMZ3aNh8= =7Vv7 -----END PGP SIGNATURE----- --vtzGhvizbBRQ85DL--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040621133003.GA96338>