Setting/changing the ctime or “Change time” attribute on a file
问题 I wish to change the timestamp metadata on files in Java using the java.nio.Files class. I would like to change all 3 Linux/ext4 timestamps (last modified, access, and changed). I am able to change the first two timestamp fields as follows: Files.setLastModifiedTime(pathToMyFile, myCustomTime); Files.setAttribute(pathToMyFile, "basic:lastAccessTime", myCustomTime); However, I am unable modify the last Change: time on the file. Also, it is concerning that there is no change timestamp mentioned