Directory last modified date

后端 未结 2 455
天涯浪人
天涯浪人 2020-12-02 10:38

Am wondering when the directory last modified date is changed. I modified a file inside a particular directory (via FTP), but the directory\'s LMD did not change. How is it

相关标签:
2条回答
  • 2020-12-02 10:59

    A directory is like a file that contains a list of the filenames in it (indeed, you may have accidentally opened a directory in an editor, where you can see it is a mostly-readable list of its contents) -- so it is modified when a file in that directory is added, removed, or renamed.

    0 讨论(0)
  • 2020-12-02 11:05

    The mtime (modification time) on the directory itself changes when a file or a subdirectory is added, removed or renamed.

    Modifying the contents of a file within the directory does not change the directory itself, nor does updating the modified times of a file or a subdirectory. If you change the permissions on the directory, the ctime changes but the mtime does not.

    0 讨论(0)
提交回复
热议问题