すべてを | |
▼開く |
閉じる▲ |
$ ls -l -rw-r--r-- 1 masa users 128 10月 14 15:17 file
$ touch -t 0010200000 file
touchコマンドで-tオプション、年月日「0010200000」と変更するファイル「file」を指定すると、ファイルのタイムスタンプが2000年10月20日00時00分に変更される。
年月日時刻指定の書式は、[[CC]YY]MMDDhhmm[.SS] である。
コマンド実行後の最終修正時刻と最終アクセス時刻を見る$ ls -l -rw-r--r-- 1 masa users 128 10月 20 2000 file $ ls -lu -rw-r--r-- 1 masa users 128 10月 20 2000 file
$ ls -l -rw-r--r-- 1 masa users 128 10月 14 14:36 file
$ touch -t 09101112 file
touchコマンドで-tオプション、時刻「09101112」と変更するファイル「file」を指定すると、ファイルのタイムスタンプが9月10日11時12分に変更される。同時に最終アクセス時刻も同じ時刻に変更される。
年月日時刻指定の書式は、[[CC]YY]MMDDhhmm[.SS] である。
コマンド実行後の最終修正時刻と最終アクセス時刻を見る$ ls -l -rw-r--r-- 1 masa users 128 9月 10 11:12 file $ ls -lu -rw-r--r-- 1 masa users 128 9月 10 11:12 file
Copyright iDesign Inc., 2005-2012