From owner-freebsd-questions@freebsd.org Thu Aug 13 23:29:39 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF8A99B8239 for ; Thu, 13 Aug 2015 23:29:39 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70D021F7 for ; Thu, 13 Aug 2015 23:29:38 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de (port-92-195-150-34.dynamic.qsc.de [92.195.150.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 7A93D3CF03; Fri, 14 Aug 2015 01:29:31 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id t7DNTULt003340; Fri, 14 Aug 2015 01:29:30 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Fri, 14 Aug 2015 01:29:30 +0200 From: Polytropon To: "Dr. Andreas Haakh" Cc: freebsd-questions@freebsd.org Subject: Re: a bug in /bin/ls Message-Id: <20150814012930.e40c0ba6.freebsd@edvax.de> In-Reply-To: <55CD23C7.9010803@ib-haakh.de> References: <55CD23C7.9010803@ib-haakh.de> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2015 23:29:39 -0000 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"' :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...