2006-05-01
●
ctime
今までずっと ctime = created time (作成時刻) だと思ってたんですが、あれって changed time (変更時刻) だったのね。道理で。
wassy> touch test && ls -l --time=ctime test
-rw-r--r-- 1 wassy wassy 0 2006-05-01 00:00 test
^^^^^
wassy> cp -p test test.new && ls -l --time=ctime test.new
-rw-r--r-- 1 wassy wassy 0 2006-05-01 00:01 test.new
^^^^^
wassy> chmod 400 test.new && ls -l --time=ctime test.new
-rw-r--r-- 1 wassy wassy 0 2006-05-01 00:02 test.new
^^^^^
chmod とか chown とかでも ctime が変わるところがミソ。属性を変更した日付、すなわち変更時刻だそうで。一方で、普通に ls -l して表示される mtime の方は modified time で「修正時刻」。
[参考]
ただ、Windows の ctime は Created Time のような挙動をするんですよね。実際「作成日時」だし、所有者変更しても DIR /TC (ls --time=ctime に相当、のはず) の出力は変わらないし。
[ツッコミを入れる]