Setting creation or change timestamps

前端 未结 4 2123
旧时难觅i
旧时难觅i 2020-12-05 04:57

Using utimes, futimes, futimens, etc., it is possible to set the access and modification timestamps on a file.

Modification ti

4条回答
  •  温柔的废话
    2020-12-05 05:59

    I had a similar issue, and wrote my answer here.

    https://stackoverflow.com/a/17066309/391040

    There are essentially two options:

    1. Slight change in kernel (code included in link)
    2. Change the system clock to the desired ctime, touch the file, then restore current time. (shell script for that included in link).

提交回复
热议问题