When does a UNIX directory change its timestamp

前端 未结 4 654
無奈伤痛
無奈伤痛 2020-12-28 12:14

I used \"touch\" on a file, updating the file\'s timestamp but the parent directory\'s timestamp did not change. However, (as expected) when I created a new file within the

4条回答
  •  失恋的感觉
    2020-12-28 12:26

    A directory's timestamp is changed when the Directory itself is changed. The directory contains, among other things, a list of the inodes of the files in the directory so when you change the content of the directory by adding or removing files then the Directories timestamp will be updated.

提交回复
热议问题