關於 PHP, Linux, Open Source 及個人生活記載的網誌。
RSS icon
  • 變更檔案最後修改時間

    Posted on December 7th, 2007 Sam Tang No comments

    如果在 Linux 想想變更檔案的最後修改時間,可以用 touch 指令,格式為 「touch -t 年月日時分秒 檔案」,例如:

    touch -t 200507012015.10 readme.txt

    以上指令會把檔案 readme.txt 的最後修改時間改為 2005 年 7 月 1 日 20 時 15 分 10 秒。

    如果想改成現時的時間,只需輸入 「touch readme.txt」。


    Leave a reply

    *
    To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
    Click to hear an audio file of the anti-spam word