From owner-freebsd-stable Mon Aug 6 15:46:56 2001 Delivered-To: freebsd-stable@freebsd.org Received: from gilmore.nas.nasa.gov (gilmore.nas.nasa.gov [129.99.32.17]) by hub.freebsd.org (Postfix) with ESMTP id D46C937B403 for ; Mon, 6 Aug 2001 15:46:50 -0700 (PDT) (envelope-from tweten@nas.nasa.gov) Received: from gilmore.nas.nasa.gov (IDENT:n4rU0dp1rKd8r/hC1lFUuDssOjlZojRh@localhost.nas.nasa.gov [127.0.0.1]) by gilmore.nas.nasa.gov (8.11.4/8.11.4) with ESMTP id f76Mk5186085; Mon, 6 Aug 2001 15:46:06 -0700 (PDT) (envelope-from tweten@gilmore.nas.nasa.gov) Message-Id: <200108062246.f76Mk5186085@gilmore.nas.nasa.gov> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Dimitry Andric Cc: Fritz Heinrichmeyer , freebsd-stable Subject: Re: ls -c does not work In-Reply-To: Message from Dimitry Andric of "Mon, 06 Aug 2001 22:36:11 +0200." <5148812478.20010806223611@xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 06 Aug 2001 15:46:05 -0700 From: Dave Tweten Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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