1

stat will report the last access time, last data modification time, and last file status change time.

utimes will allow one to set the last access time and last data modification time.

Is there a function that allows one to set the last file status change time?

1

st_ctime is updated whenever you change the file's names (move/rename/hardlink), ownership (chown/chgrp) or permissions (chmod/setfacl). There is no way to set this field to an arbitrary timestamp.

| improve this answer | |
  • Well, there must be a way to set the timestamp because it changes - so some piece of code must be doing it somewhere. But, I agree, there doesn't appear to be any publicly accessible way to do it. – ericg Aug 26 '11 at 12:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.