1 回答

TA貢獻(xiàn)1796條經(jīng)驗(yàn) 獲得超4個(gè)贊
按照man文檔的解釋的三種時(shí)間: st_atime
Time when file data was last accessed. Changed by the
following functions: creat(), mknod(), pipe(),
utime(2), and read(2).
st_mtime
Time when data was last modified. Changed by the fol-
lowing functions: creat(), mknod(), pipe(), utime(),
and write(2).
st_ctime
Time when file status was last changed. Changed by the
following functions: chmod(), chown(), creat(),
link(2), mknod(), pipe(), unlink(2), utime(), and
write().實(shí)際使用中touch確實(shí)會(huì)改變mtiem和ctime,我的理解是透徹修改mtime的方式是通過(guò)修改文件能容,保存,然后還原文件內(nèi)容再保存,因此mtime和ctime都會(huì)改變。
希望對(duì)你有幫助?。?/p>
添加回答
舉報(bào)