Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Style question: Can this be written in a more elegant way?
- X-seq: zsh-users 10187
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Style question: Can this be written in a more elegant way?
- Date: Tue, 25 Apr 2006 08:06:01 -0700
- In-reply-to: <444DD773.5060003@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <6F0CB04509C11D46A54232E852E390AC013D9EF9@xxxxxxxxxxxxxxxxxxxxxxxxxx> <444DD773.5060003@xxxxxxxxxxxxxxxxxx>
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)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author