Mailinglist Archive: opensuse (3566 mails)
| < Previous | Next > |
Re: [opensuse] Timestamping [ Was : Converting file system]
- From: Randall R Schulz <rschulz@xxxxxxxxx>
- Date: Thu, 26 Apr 2007 06:45:55 -0700
- Message-id: <200704260645.55652.rschulz@xxxxxxxxx>
On Thursday 26 April 2007 04:50, Carlos E. R. wrote:
> ...
>
> The things is, if the modification time is the same, the file data
> will still be the same
That does not necessarily follow. There is a system call that allows
user code to arbitrarily change the file time (it's used, in part, by
backup programs that want to reset the file times of the restored file
to those that were in effect for the file when it was saved to the
backup medium).
I know it's not typical, but then, once upon a time, I wrote a Unix tool
that would save specified files' times, invoke an arbitrary command and
when that command exited, restore the files' times. We ended up using
it quite a lot, I recall, though for some reason I don't quite recall
why (it was a long time ago).
> and doesn't need to be backed up again. On the
> other hand, if it has changed, there is a doubt: either check a
> checksum and decide, or backup regardless.
The point is, the only 100% reliable way to tell if a file has changed
is to compare it to the original. A checksum (not necessarily MD5) is
the next best. Modification time alone is the weakest and least
reliable way.
> ...
>
> --
> Cheers,
> Carlos E. R.
Randall Schulz
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
> ...
>
> The things is, if the modification time is the same, the file data
> will still be the same
That does not necessarily follow. There is a system call that allows
user code to arbitrarily change the file time (it's used, in part, by
backup programs that want to reset the file times of the restored file
to those that were in effect for the file when it was saved to the
backup medium).
I know it's not typical, but then, once upon a time, I wrote a Unix tool
that would save specified files' times, invoke an arbitrary command and
when that command exited, restore the files' times. We ended up using
it quite a lot, I recall, though for some reason I don't quite recall
why (it was a long time ago).
> and doesn't need to be backed up again. On the
> other hand, if it has changed, there is a doubt: either check a
> checksum and decide, or backup regardless.
The point is, the only 100% reliable way to tell if a file has changed
is to compare it to the original. A checksum (not necessarily MD5) is
the next best. Modification time alone is the weakest and least
reliable way.
> ...
>
> --
> Cheers,
> Carlos E. R.
Randall Schulz
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
| < Previous | Next > |