> No confusion. I just read your statement and looked at the code and > your code resets both the modified time and the accessed time for the > file. The utime() system call sets both access and modification times at the same time. If you were to only set one value, the other would be undefined, possibly ZERO! You need to use lstat() to read both values, prior to accessing the file, then reset both values with utime(), even though the modification time never changes. > If someone just 'cat' a file or viewed it without changing anything, > the access time will change always. True... > Unless you are using the accessed time to determine if a file is safe > to remove or move to permanent backup somewhere. Exactly... and if my AV scanner updates the access times, then all my data looks like it is live.
_______________________________________________ http://lurker.clamav.net/list/clamav-users.html