Re: ls -c / ls -u doesn't work anymore

From: Jan Stocker <Jan.Stocker_at_t-online.de>
Date: Sun, 05 Oct 2003 13:08:54 +0200
On Sun, 2003-10-05 at 12:11, Bruce Evans wrote:
> On Sun, 5 Oct 2003, Jan Stocker wrote:
> 
> > Newest world/kernel.... same prob
> >
> > jstocker_at_Twoflower:~ # mkdir x
> > jstocker_at_Twoflower:~ # cd x
> > jstocker_at_Twoflower:~/x # touch b-first; sleep 60
> > jstocker_at_Twoflower:~/x # touch c-second; sleep 60
> > jstocker_at_Twoflower:~/x # touch a-third
> > jstocker_at_Twoflower:~/x # ls -l -c
> > total 0
> > -rw-r--r--  1 jstocker  jstocker  0  5 Oct 11:10 a-third
> > -rw-r--r--  1 jstocker  jstocker  0  5 Oct 11:08 b-first
> > -rw-r--r--  1 jstocker  jstocker  0  5 Oct 11:09 c-second
> >
> >
> > looks very alphabetic....
> 
> -c and -u only work when combined with -t.  This may be bogus, but it
> is no different than in 4.4BSD-Lite2 and it is specified by POSIX
> (POSIX.1-200x-draft7:
> 
> 21836                 -c            Use time of last modification of the file status information (see <sys/stat.h> in the
> 21837                               System Interfaces volume of IEEE Std 1003.1-200x) instead of last modification of
> 21838                               the file itself for sorting (-t) or writing (-l).
> 21864                 -u            Use time of last access (see <sys/stat.h> in the System Interfaces volume of
> 21865                               IEEE Std 1003.1-200x) instead of last modification of the file for sorting (-t) or
> 21866                               writing (-l).
> 
> The FreeBSD ls clearly attempts to implement this.   The FreeBSD man page
> is clearly a fuzzy version of this:
> 
>      -c      Use time when file status was last changed for sorting or print-
>              ing.
>      -u      Use time of last access, instead of last modification of the file
>              for sorting (-t) or printing (-l).
> 
> The FreeBSD man page is missing the critical detail that the status change
> time and access times are used _instead_ of the modification time.

and then -t sorts that date... okay.... works fine.... 

Jan



P.S.
but the behaviour has changed and i've nowhere read it..... my old box:

FreeBSD xxxx 4.7-RC FreeBSD 4.7-RC #0: Thu Sep 19 01:04:45 MEST 2002    
root_at_xxxx:/usr/obj/usr/src/sys/xxxx  i386

has a <working> "ls -c" and does not need "ls -t -c". 

Jan
Received on Sun Oct 05 2003 - 02:09:09 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:24 UTC