차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

다음 판
이전 판
tech:touch [2023/07/30 16:07] – 만듦 V_Ltech:touch [2023/07/30 16:31] (현재) V_L
줄 7: 줄 7:
  
  
 +리눅스의 모든 파일은 네가지 시간을 가진다. 
 +
 +리눅스에는 세 종류의 타임스탬프가 있다.
 +
 +  * Access time : 어떤 앱에 의해 마지막으로 접근된 시간  
 +  * Modification time : 마지막으로 내용이 수정된 시간  
 +  * Changed time : 마지막으로 파일의 메타데이타, 특성, 내용이 변경된 시간 
 +  * Birth time  : 파일이 만들어진 시간  
 +
 +<file>
 +$stat test.txt
 +Access: 2023-07-30 21:33:48.207773129 +0900
 +Modify: 2023-07-21 00:00:00.000000000 +0900
 +Change: 2023-07-30 21:32:55.767834971 +0900
 + Birth: 2023-07-21 23:40:39.805987832 +0900
 +</file>
 +stat 명령어로 볼 수 있다.
 +
 +
 +  $ touch [파일명]
 +별다른 옵션이 없다면 atime, ctime, mtime 모두 변경된다.
 +
 +
 +  * -a Used to change only the access time.
 +  * -m Used to change only the modification time.
 +  * -d Used to update the access and modification times.
 +  * -c Do not create a new file, if the does not exist.
 +  * -r Used to use the access and modification times of another file.
 +  * -t Used to create a file with a specified time.