Using utimes
, futimes
, futimens
, etc., it is possible to set the access and modification timestamps on a file.
Modification time is the last time the file data changed. Similarly, "ctime" or change time, is the last time attributes on the file, such as permissions, were changed. (Linux/POSIX maintains three timestamps: mtime and ctime, already discussed, and 'atime', or access time.)
Is there a function to set change timestamps? (Where "change" is the attribute modification or 'ctime', not modification time 'mtime'.) (I understand the cyclic nature of wanting to change the change timestamp, but think archiving software - it would be nice to restore a file exactly as it was.)
Are there any functions at all for creation timestamps? (I realize that ext2
does not support this, but I was wondering if Linux did, for those filesystems that do support it.)
If it's not possible, what is the reasoning behind it not being so?
touch
does not have a parameter (at least, my version does not or is not documented to have one) for changing creation or change times.touch
will change modification or access times, however. – Assyriologytouch
has the capability to set change timestamps in any way. Note that I'm looking for change timestamps, which are a different beast from modification timestamps. I've tried to clarify my post on this point, if this is what is confusing. If it is not, what passage from that page gives you that suggestion? – Assyriology