Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
「 touch」コマンドを使用して、Unixシステムの特定のファイルの「 modification」(mtime)と「lastaccess 」 (atime )の両方の時間プロパティを変更する方法があることを知っています。しかし、「最終ステータス変更」(ctime)プロパティを変更する方法もあるのでしょうか。
ctime は、ファイルの inode が最後に変更された時刻です。mtime は、ファイルの内容が最後に変更された時刻です。ctime を変更するには、ファイルに対して chmod や chown を実行するなど、i ノードに対して何らかの操作を行う必要があります。
atime/mtime/ctime の値は inode に格納されているため、ファイルの内容を変更すると、必然的に ctime も更新されます。mtime を変更すると、ctime も更新されます。