touch ¸í·É¾î¸¦ ÅëÇؼ atime, ctime º¯°æÀÌ °¡´ÉÇÏ´Ù.
-t STAMP
use [[CC]YY]MMDDhhmm[.ss] instead of current time
# 2011³â 01¿ù11ÀÏ 20½Ã00ºÐ¿¡ index ÆÄÀÏ»ý¼º
[root@chonnom root]# touch -t 1101112000 index.html
[root@chonnom rootl]# stat index.html File: `index.html' Size: 4 Blocks: 8 IO Block: 16384 ÀÏ¹Ý ÆÄÀÏ Device: 13h/19d Inode: 4415152 Links: 1 Access: (0666/-rw-rw-rw-) Uid: ( 1128/ UNKNOWN) Gid: ( 1000/ UNKNOWN) Access: 2011-01-11 20:00:00.000000000 +0900 Modify: 2011-01-11 20:00:00.000000000 +0900 Change: 2011-02-28 13:53:19.000000000 +0900 |
File and directory timestamps in Unix
Three times tracked for each file in Unix are these:
- access time - atime : ÆÄÀÏÀ» ¿°Å³ª Á¢±ÙÇÑ ½Ã°£
- change time – ctime : ÆÄÀÏÀÇ Á¤º¸°¡ º¯°æµÈ ½Ã°£ (¼Ó¼ºÀ̳ª ÆÛ¹Ì¼Ç º¯°æ)
- modify time – mtime : ÆÄÀÏÀÇ ³»¿ëÀÌ º¯°æµÈ½Ã°£
# atime ½Ã°£È®ÀÎ
[root@chonnom root]# ls -lu
-rw-rw-rw- 1 1128 1000 0 11¿ù 11 11:11 index.html
# ctime ½Ã°£È®ÀÎ
[root@chonnom root]# ls -lc
-rw-rw-rw- 1 1128 1000 0 2¿ù 28 13:27 index.html
# mtime ½Ã°£È®ÀÎ
[root@chonnom root]# ls -l -rw-rw-rw- 1 1128 1000 0 11¿ù 11 11:11 index.html
# ¼¼°¡Áö ¼Ó¼º½Ã°£À» ÇѲ¨¹ø¿¡ È®ÀÎ
[root@chonnom root]# stat index.html File: `index.html' Size: 0 Blocks: 0 IO Block: 16384 ÀÏ¹Ý ºó ÆÄÀÏ Device: 13h/19d Inode: 4398943 Links: 1 Access: (0666/-rw-rw-rw-) Uid: ( 1128/ UNKNOWN) Gid: ( 1000/ UNKNOWN) Access: 2010-11-11 11:11:00.000000000 +0900 Modify: 2010-11-11 11:11:00.000000000 +0900 Change: 2011-02-28 13:27:35.000000000 +0900 |