zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@sunsite.dk
Subject: Re: Style question: Can this be written in a more elegant way?
Date: Tue, 25 Apr 2006 08:06:01 -0700	[thread overview]
Message-ID: <060425080601.ZM1910@torch.brasslantern.com> (raw)
In-Reply-To: <444DD773.5060003@ulpmm.u-strasbg.fr>

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)


  reply	other threads:[~2006-04-25 15:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-25  6:37 Com MN PG P E B Consultant 3
2006-04-25  8:01 ` Marc Chantreux
2006-04-25 15:06   ` Bart Schaefer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-04-24  7:26 Com MN PG P E B Consultant 3
2006-04-24  8:27 ` Marc Chantreux
2006-04-24 15:21   ` Bart Schaefer
2006-04-25  7:55     ` Marc Chantreux
2006-04-25 14:41       ` Bart Schaefer
2006-04-25 14:58         ` Marc Chantreux
2006-04-25 17:03           ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=060425080601.ZM1910@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).