Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Aug 2015 02:01:41 +0200
From:      "Dr. Andreas Haakh" <bugReporter@ib-haakh.de>
To:        Polytropon <freebsd@edvax.de>, freebsd-questions@freebsd.org
Subject:   Re: a bug in /bin/ls
Message-ID:  <55CD2FE5.5050309@ib-haakh.de>
In-Reply-To: <20150814012930.e40c0ba6.freebsd@edvax.de>
References:  <55CD23C7.9010803@ib-haakh.de> <20150814012930.e40c0ba6.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Am 14.08.2015 um 01:29 schrieb Polytropon:
> On Fri, 14 Aug 2015 01:09:59 +0200, Dr. Andreas Haakh wrote:
>> On:
>> FreeBSD Crabberio.Haakh.de 10.2-PRERELEASE FreeBSD 10.2-PRERELEASE #0
>> r286580: Mon Aug 10 19:49:05 CEST 2015    
>> toor@Crabberio.Haakh.de:/usr/obj/usr/src/sys/CRABBERIO  amd64
>>
>> using the "-U"-flag in /bin/ls  together with "-l"
>> leads to the following output
>> [...]
>> -rwxr--r--  1 krabbe  ibh    798720  1 Jan  1970 IMAG1562.jpg
>> -rw-r--r--  1 krabbe  ibh    579493  1 Jan  1970 IMAG1714.jpg
>> [...]
>>
>> and the sorting is not affected by the flag (still by name).
> What file system (FS type) do those files reside on? It seems
> that the file creation date hasn't been recorded properly (or
> the file system in use doesn't have that feature), or the date
> has been reset to "zero" (00:00:00 UTC on 1 January 1970).
> It's also possible that FS inode data got corrupted.
>
> However, sorting by creation date using -U doesn't seem to work
> on my system, too:
>
> % ll
> -rw-r--r--   1 poly  staff      0 2015-08-14 01:21:29 a
> -rw-r--r--   1 poly  staff      0 2015-08-14 01:21:25 b
>
> This is sorted by name, as expected, but:
>
> % ll -U
> -rw-r--r--   1 poly  staff      0 2015-08-14 01:21:29 a
> -rw-r--r--   1 poly  staff      0 2015-08-14 01:21:25 b
>
> Those lines should be in reverse order... and none of the
> time-related flags (-c, -u, -U) seems to change the fact
> that the files are sorted alphabetically.
>
>
>
> NB: ll = 'ls -laFG -D "%Y-%m-%d %H:%M:%S"' :-)
>

My example comes from an nfs-mounted ufs-filesystem -- the server is

FreeBSD abaton 9.3-STABLE FreeBSD 9.3-STABLE #0 r284539: Thu Jun 18
12:55:12 CEST 2015     toor@abaton:/usr/obj/usr/src/sys/ABATON  amd64

mount on my server gives (among others)
/dev/mirror/gm0p1 on /datM (ufs, NFS exported, local, nfsv4acls) <---
this one
/dev/mirror/gm0p2 on /datV (ufs, NFS exported, local)
/arr0/mmed on /mmed (zfs, NFS exported, local, nfsv4acls)

The second fs (without nfsv4acls) and the last one (zfs) give me the
same results.

The lowercase variant of the options "-u" gives a real date but ordering
doesn't work either.

I guess the ordering (on ufs) should be taken care of and the
date-problem should be handled afterwards.

Best regards
Andreas Haakh

N.B.: Senile Bettflucht ;-) ??




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