Date: Mon, 06 Aug 2001 15:46:05 -0700 From: Dave Tweten <tweten@nas.nasa.gov> To: Dimitry Andric <dim@xs4all.nl> Cc: Fritz Heinrichmeyer <fritz.heinrichmeyer@fernuni-hagen.de>, freebsd-stable <freebsd-stable@FreeBSD.ORG> Subject: Re: ls -c does not work Message-ID: <200108062246.f76Mk5186085@gilmore.nas.nasa.gov> In-Reply-To: Message from Dimitry Andric <dim@xs4all.nl> of "Mon, 06 Aug 2001 22:36:11 %2B0200." <5148812478.20010806223611@xs4all.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
dim@xs4all.nl said: >Btw, does anybody know what POSIX says about this matter [ -c and -v >options on ls, and whether specifying a different time implies sorting >by that time]? From POSIX.2-1992 (sorry, that's the most recent I have at my office): "-c Use time of last modification of the file status information (see Section 5.6.1.3 of POSIX.1 {8}) instead of last modification of the file itself for sorting (-t) or writing (-l)." "-r Reverse the order of the sort to get reverse collating sequence or oldest first. -t Sort by time modified (most recently modified first) before sorting the operands by the collating sequence. -u Use time of last access (see Section 5.6.1.3 of POSIX.1 {8}) instead of last modification of the file for sorting (-t) or writing (-l)." Section 5.6.1.3 of POSIX.1b-1993 gives the definitions of access, modify, and change times. The main section of the ls description (Section 4.39.2) says: "If more than one operand is specified, nondirectory operands shall be written first; directory and nondirectory operands shall be sorted separately according to the collating sequence in the current locale." So you see that if GNU ls interprets "-c" as also implying "-t" it seems to be in violation of POSIX. -- M/S 258-5 | 1024-bit PGP fingerprint: | tweten@nas.nasa.gov NASA Ames Research Center | 41 B0 89 0A 8F 94 6C 59 | (650) 604-4416 Moffett Field, CA 94035-1000 | 7C 80 10 20 25 C7 2F E6 | FAX: (650) 604-4377 We each earn what freedom of speech we defend for those who most offend us. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108062246.f76Mk5186085>