From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6118 invoked from network); 22 Aug 2005 15:32:18 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 22 Aug 2005 15:32:18 -0000 Received: (qmail 78146 invoked from network); 22 Aug 2005 15:32:09 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 22 Aug 2005 15:32:09 -0000 Received: (qmail 14460 invoked by alias); 22 Aug 2005 15:32:01 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9339 Received: (qmail 14445 invoked from network); 22 Aug 2005 15:32:00 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 22 Aug 2005 15:32:00 -0000 Received: (qmail 77249 invoked from network); 22 Aug 2005 15:32:00 -0000 Received: from ns9.hostinglmi.net (213.194.149.146) by a.mx.sunsite.dk with SMTP; 22 Aug 2005 15:31:53 -0000 Received: from 212.red-80-35-44.pooles.rima-tde.net ([80.35.44.212] helo=localhost) by ns9.hostinglmi.net with esmtpa (Exim 4.52) id 1E7EHD-0004hP-0S; Mon, 22 Aug 2005 17:31:55 +0200 Date: Mon, 22 Aug 2005 17:35:29 +0200 From: DervishD To: Shawn Halpenny Cc: zsh-users@sunsite.dk Subject: Re: Extract CTIME in zsh 4.2.3? Message-ID: <20050822153529.GA66@DervishD> Mail-Followup-To: Shawn Halpenny , zsh-users@sunsite.dk References: <95E667D6-6AE4-4CDA-B420-30033315C886@tntluoma.com> <44613de005082113114c9f2092@mail.gmail.com> <16D53E3C-D453-414D-AB6C-3280FF5573CF@tntluoma.com> <44613de005082208246036665e@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <44613de005082208246036665e@mail.gmail.com> User-Agent: Mutt/1.4.2.1i Organization: DervishD X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ns9.hostinglmi.net X-AntiAbuse: Original Domain - sunsite.dk X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - dervishd.net X-Source: X-Source-Args: X-Source-Dir: X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 Hi Shawn and Timothy :) * Shawn Halpenny dixit: > On 8/22/05, Timothy Luoma wrote: > > I've found a solution, but this will only work with Tiger (Mac OS X > > version 10.4.x)... > Ahh, it wasn't clear you wanted the create-time. In Unix (and any > sufficiently Unix-like operating system) the "ctime" for a file is the > last time there was a change to the file's inode and is generally > portable. Not all Unixes keep track of the create-time for a file, so > any mechanism to retrieve it is almost certainly non-portable. In fact, it is not present in SUS. Probably it is present only for a few filesystems, so it has to be retrieved in a non-portable way. Under Linux, I don't recall now of any filesystem that implements creation time for entries. It's not an operating system problem, is a filesystem problem. Even in the case you can write code for some UNIX flavour to retrieve that data, it will only work for some particular filesystem. The VFS on top of that will only store the st_atime, st_mtime and st_ctime values in the metadata. Another solution will be to create a dotfile or something like that when creating the file whose creation date you want to obtain, and make sure the file contents of that dotfile (or associated file, whatever you call it) doesn't change. Then the st_mtime of the associated file will be the creation time of the 'real' file. Not a very clean solution, but... Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 | http://www.dervishd.net http://www.pleyades.net & http://www.gotesdelluna.net It's my PC and I'll cry if I want to...