トップ «前の日記(2006-04-30) 最新 次の日記(2006-05-02)» 編集

Public Diary

For antenna, use RSS(RDF) or LIRS.


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 に相当、のはず) の出力は変わらないし。



1980|03|
1986|04|
1998|04|
2002|01|11|
2003|03|04|05|07|08|
2004|01|02|03|04|05|06|07|08|09|10|11|12|
2005|01|02|03|04|05|06|07|08|09|10|11|12|
2006|01|02|03|04|05|06|07|08|09|10|11|12|
2007|02|03|04|06|07|08|11|12|
2008|01|02|03|04|06|07|08|