duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Duplicity-talk] Preventing access time modification?


From: Axel Beckert
Subject: Re: [Duplicity-talk] Preventing access time modification?
Date: Tue, 12 Jun 2007 11:08:20 +0200
User-agent: Mutt/1.5.9i

Hi,

On Tue, Jun 12, 2007 at 01:21:01AM -0700, mike wrote:
> however, isn't that something done at a lower-level than the
> language?

Yes and no. You don't say to the system "don't do that", you let it
change the dates and change them back afterwards. :)

There are at least command-line tools available to modify those dates
in the inode, e.g. "touch" can do the job if you use the right
parameters. But I would expect, that Python offers access to the
system call utime(2) which touch uses for that.

So if you stat(2) all files before accessing them and reset the dates
using utime(2) to the value stat return after accessing the files, it
should be no problem, but will at least add two disk accesses per
file.

> i would think the atime stuff is done on the filesystem level, which
> could prove challenging to stop on the python level (but i could
> totally be wrong)

Shouldn't be too hard. In Perl it's called "utime" as the system call:

  utime LIST

    Changes the access and modification times on each file of a list
    of files. The first two elements of the list must be the NUMERICAL
    access and modification times, in that order. Returns the number
    of files successfully changed. The inode change time of each file
    is set to the current time.

I expect that Python offers something very similar.

                Regards, Axel
-- 
Axel Beckert - address@hidden, address@hidden - http://noone.org/abe/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]