系統及路徑:RedHat:{/bin/touch}
shared library:
libc.so.6 => /lib/libc.so.6 (0x4001b000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
用途說明:
這個程式用來改變一個檔案的 TimeStamps 可以把檔案的 access 和 modification time 改成現在的時間
或是指定的時間
摘要:
touch [OPTION]... FILE...
選項說明:
-a 只改變 access time
-c, --no-create如果沒有指定的檔案,不會產生新的檔案
-d, --date=STRING
使用指定的 STRING 替代現在的時間
-m 只改變 modification time
-r, --reference=FILE使用指定的檔案的時間替代現在的時間
-t STAMP
用 [[CC]YY]MMDDhhmm[.ss] 所指定的時間替代現在的時間
--time=WORD
使用指定的WORD替代現在的時間
--help 顯示說明訊息
--version 顯示程式版本資訊
使用實例:
[tstusr@WithHeart tstusr]$ ls -l test -rw-r--r-- 1 tstusr users 73578 Oct 6 06:46 test [tstusr@WithHeart tstusr]$ touch test [tstusr@WithHeart tstusr]$ ls -l test -rw-r--r-- 1 tstusr users 73578 Oct 6 06:50 test [tstusr@WithHeart tstusr]$ touch -t 10042000 test [tstusr@WithHeart tstusr]$ ls -l test -rw-r--r-- 1 tstusr users 73578 Oct 4 20:00 test [tstusr@WithHeart tstusr]$ ls -l --time=atime test -rw-r--r-- 1 tstusr users 73578 Oct 4 20:00 test [tstusr@WithHeart tstusr]$ touch -a test [tstusr@WithHeart tstusr]$ ls -l --time=atime test -rw-r--r-- 1 tstusr users 73578 Oct 6 06:52 test [tstusr@WithHeart tstusr]$ ls -l test -rw-r--r-- 1 tstusr users 73578 Oct 4 20:00 test |
|
其他: | |
可以利用 touch 某些檔案,來使某些有使用時間限制的程式 保持在一直可以使用的狀況之下... 另外,在執行 make 時,也是藉由 touch 來觀察檔案是否有所改變... |
這樣就只需要針對改變的部分重新 make 就可以了...