47 shaares
1 lien privé
1 lien privé
1 résultat
taggé
date
The time-related fields of struct stat are as follows, man lstat:
- atime: Time when file data last accessed.
- mtime: Time when file data last modified.
- ctime: Time when file status was last changed
- birthtime or btime: Time of file creation. Only set once when the file is created.
-
To modify access time (atime):
touch -a -t CCYYMMDDhhmm.SS file.txt(example: 201811251820.52 = 25 novembre 2018 à 18 h 20 min 52 s) -
To modify modification time (mtime) and time of file creation (btime):
touch -m -t CCYYMMDDhhmm.SS file.txt -
To modify only the time of creation/birth (btime):
SetFile -d "11/25/2018 18:20:52" file.txt