게시물 1,375건
   
touch 생성날짜 변경, atime, ctime, mtime
글쓴이 : 최고관리자 날짜 : 2011-02-28 (월) 13:49 조회 : 19317
글주소 :
                                
 
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

이름 패스워드
비밀글 (체크하면 글쓴이만 내용을 확인할 수 있습니다.)
왼쪽의 글자를 입력하세요.
   

 



 
사이트명 : 모지리네 | 대표 : 이경현 | 개인커뮤니티 : 랭키닷컴 운영체제(OS) | 경기도 성남시 분당구 | 전자우편 : mojily골뱅이chonnom.com Copyright ⓒ www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.