Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Jun 2004 20:35:45 +0100
From:      Scott Mitchell <scott+freebsd@fishballoon.org>
To:        Dimitry Andric <dimitry@andric.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: /bin/ls sorting bug?
Message-ID:  <20040619193545.GC462@tuatara.fishballoon.org>
In-Reply-To: <414787887.20040619210137@andric.com>
References:  <20040619175007.GB462@tuatara.fishballoon.org> <414787887.20040619210137@andric.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jun 19, 2004 at 09:01:37PM +0200, Dimitry Andric wrote:
> On 2004-06-19 at 19:50:07 Scott Mitchell wrote:
> 
> > (562) tuatara:/tmp/foo $ ls -lt
> > total 0
> > -rw-rw-r--  1 scott  wheel  0 19 Jun 17:48 c
> > -rw-rw-r--  7 scott  wheel  0 19 Jun 17:13 b
> > -rw-rw-r--  7 scott  wheel  0 19 Jun 17:13 d
> > -rw-rw-r--  7 scott  wheel  0 19 Jun 17:13 e
> > -rw-rw-r--  7 scott  wheel  0 19 Jun 17:13 f
> > -rw-rw-r--  7 scott  wheel  0 19 Jun 17:13 g
> > -rw-rw-r--  7 scott  wheel  0 19 Jun 17:13 h
> > -rw-rw-r--  1 scott  wheel  0 19 Jun 17:13 i
> > -rw-rw-r--  1 scott  wheel  0 19 Jun 17:13 j
> > -rw-rw-r--  7 scott  wheel  0 19 Jun 17:13 a
> > -rw-rw-r--  1 scott  wheel  0 19 Jun 17:13 k
> 
> Can you please show the output of "ls -ltT" ?

Sure (added -i to make it easier to see what's going on here):

(505) tuatara:/tmp/foo $ ls -iltT
total 0
35 -rw-rw-r--  1 scott  wheel  0 19 Jun 17:48:40 2004 c
11 -rw-rw-r--  7 scott  wheel  0 19 Jun 17:13:36 2004 b
11 -rw-rw-r--  7 scott  wheel  0 19 Jun 17:13:36 2004 d
11 -rw-rw-r--  7 scott  wheel  0 19 Jun 17:13:36 2004 e
11 -rw-rw-r--  7 scott  wheel  0 19 Jun 17:13:36 2004 f
11 -rw-rw-r--  7 scott  wheel  0 19 Jun 17:13:36 2004 g
11 -rw-rw-r--  7 scott  wheel  0 19 Jun 17:13:36 2004 h
41 -rw-rw-r--  1 scott  wheel  0 19 Jun 17:13:36 2004 i
51 -rw-rw-r--  1 scott  wheel  0 19 Jun 17:13:36 2004 j
11 -rw-rw-r--  7 scott  wheel  0 19 Jun 17:13:36 2004 a
52 -rw-rw-r--  1 scott  wheel  0 19 Jun 17:13:36 2004 k

Most of those files (a,b,d,e,f,g,h) are hard-linked to each other - so they
definitely share the same timestamp.  i,j,k were created with 'touch -r a i
j k', so they should also have the same time.  c is different to make sure
I didn't break the sort order when files *did* have different times.

	Scott

-- 
===========================================================================
Scott Mitchell           | PGP Key ID | "Eagles may soar, but weasels
Cambridge, England       | 0x54B171B9 |  don't get sucked into jet engines"
scott at fishballoon.org | 0xAA775B8B |      -- Anon



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