ファイルのタイムスタンプを変更する

touchコマンドに引数を付けることで任意のタイムスタンプをファイルに付与することができる。
touchの-tオプションを使うことでタイムスタンプを変更することができ、touchのヘルプでは以下の説明がなされている。

-t STAMP               use [[CC]YY]MMDDhhmm[.ss] instead of current time
touch -t 200605051130 test.txt
-rw-r--r--   1 root root     0 May  5  2006 test.txt
touch -t 200805051130 test.txt
-rw-r--r--   1 root root     0 May  5 11:30 test.txt

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2025-03-16 (日) 23:20:14