ls -l
で表示されるタイムスタンプについて、『具体的に何の時間?』という部分が曖昧だったのでまとめておく。
man ls
を叩くと下記の説明を確認できた。タイムスタンプは『modified(変更された)』時間とのことだった。
The Long Format If the -l option is given, the following information is displayed for each file: file mode, number of links, owner name, group name, number of bytes in the file, abbreviated month, day-of-month file was last modified, hour file last modified, minute file last modified, and the pathname.
ここで、class File::Statをみてみると、取得できる時間は、atime
,ctime
,mtime
の3種類がある。
もう少し調べてみると、下記の違いがあることを理解した。多分atime
のa
はaccess
で、ctime
のc
はcreate
、mtime
のm
はmodified
だと思われる。
タイムスタンプ名 | 概要 | 説明 |
---|---|---|
atime | アクセス時間 | 指定日数内にアクセスされたファイル |
ctime | 作成時間 | 指定日数内に属性変更されたファイル |
mtime | 修正時間(iノード管理) | 指定日数内に修正、更新されたファイル |