From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27076 invoked from network); 25 Apr 2006 15:06:22 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.1 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 25 Apr 2006 15:06:22 -0000 Received: (qmail 82507 invoked from network); 25 Apr 2006 15:06:16 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 25 Apr 2006 15:06:16 -0000 Received: (qmail 20495 invoked by alias); 25 Apr 2006 15:06:08 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10187 Received: (qmail 20485 invoked from network); 25 Apr 2006 15:06:08 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 25 Apr 2006 15:06:08 -0000 Received: (qmail 81402 invoked from network); 25 Apr 2006 15:06:08 -0000 Received: from vms042pub.verizon.net (206.46.252.42) by a.mx.sunsite.dk with SMTP; 25 Apr 2006 15:06:07 -0000 Received: from torch.brasslantern.com ([71.116.76.26]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IYA00KRY9Y2H7L4@vms042.mailsrvcs.net> for zsh-users@sunsite.dk; Tue, 25 Apr 2006 10:06:06 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id k3PF61fC001912 for ; Tue, 25 Apr 2006 08:06:02 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id k3PF61Dg001911 for zsh-users@sunsite.dk; Tue, 25 Apr 2006 08:06:01 -0700 Date: Tue, 25 Apr 2006 08:06:01 -0700 From: Bart Schaefer Subject: Re: Style question: Can this be written in a more elegant way? In-reply-to: <444DD773.5060003@ulpmm.u-strasbg.fr> To: zsh-users@sunsite.dk Message-id: <060425080601.ZM1910@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <6F0CB04509C11D46A54232E852E390AC013D9EF9@MCHP7R6A.ww002.siemens.net> <444DD773.5060003@ulpmm.u-strasbg.fr> Comments: In reply to Marc Chantreux "Re: Style question: Can this be written in a more elegant way?" (Apr 25, 10:01am) On Apr 25, 10:01am, Marc Chantreux wrote: } Subject: Re: Style question: Can this be written in a more elegant way? } } > [OT] How exact are time stamps on files? } } man stat That's not very helpful. "man 2 stat" might be better, but not much. On my system, neither of them explains what a time_t represents. The stored accuracy of file time stamps varies by operating system implementation. For practical shell programming purposes, though, it has one-second granularity. Modern computers can create or modify a lot of files in one second. } > If, basically, a time_t value is choosen for a time stamp, then in } > practice the only possibility for two files to come up with the } > same time stamp, is when the time stamp is explicitly supplied via } > "touch", isn't it? } } I think you're right but i'm not an expert. Even if you're somehow prevented from writing more than one file per second, there are a LOT of ways two files could get the same stamp. Just a few I can think of immediately: - hard-link a file to a second name with "ln" - copy a file with "cp -a" or "tar" etc. - set the system clock back (e.g., ntpd adjusting for drift)