I’m writing backup software. I want to programmatically determine if a file has been modified since last time. Is a flag or something like that on files under the EXT3 filesystem?
I’m writing backup software. I want to programmatically determine if a file has been
Share
Sure. Just call
stat()on the file, and inspect the st_mtime member:If you have in the application a timestamp when the last backup was made, you can compare directly.
Note though that not all filesystems really update the modified time, as doing so is kind of expensive. You seem to be aware of this risk.