Is it possible to detect if files on a drive were changed without scanning the drive?
Grant Edwards
grante at visi.com
Mon Sep 12 13:42:24 EDT 2005
On 2005-09-12, Oren Tirosh <oren.tirosh at gmail.com> wrote:
> Whenever a file is modified the last modification time of the directory
> containing it is also set.
Nope.
$ ls -ld --time-style=full-iso .
drwxr-xr-x 2 grante grante 4096 2005-09-12 12:38:04.749815352 -0500 ./
$ touch asdf
$ ls -ld --time-style=full-iso .
drwxr-xr-x 2 grante grante 4096 2005-09-12 12:39:35.657995208 -0500 ./
$ echo "hi" >asdf
$ ls -ld --time-style=full-iso .
drwxr-xr-x 2 grante grante 4096 2005-09-12 12:39:35.657995208 -0500 ./
$ echo "foo" >asdf
$ ls -ld --time-style=full-iso .
drwxr-xr-x 2 grante grante 4096 2005-09-12 12:39:35.657995208 -0500 ./
Notice that writing to the file did not change the modification
date of the directory contining it.
--
Grant Edwards grante Yow! - if it GLISTENS,
at gobble it!!
visi.com
More information about the Python-list
mailing list