Touch
둘러보기로 이동
검색으로 이동
사용자 명령. 터미널 명령.
이름 및 목적[편집]
touch - change file timestamps
파일의 시간을 바꿉니다.
용법[편집]
touch [옵션]... 파일...
사용예[편집]
1. 특정 파일의 시간을 현재시간으로 변경
$ touch a.txt
2. 크기가 0인 파일 만들기
$ touch new.txt
3. 파일이 없을 경우 파일을 만들지 않고 파일이 있을 경우에만 시간 변경
$ touch -c b.txt
4. 특정 시간으로 변경
$ touch -t 201408271457 c.txt
5. 여러 개의 파일 변경
$ touch a.txt b.txt c.txt
옵션[편집]
터미널 명령의 대부분은 옵션은 "--"으로 시작하는 풀네임과 "-"으로 시작하는 단축 문자가 있습니다.
자주 사용되는 옵션[편집]
- 파일이 없어도 새로 생성하지 않음
-c, --no-create
- 현재 시간 대신 [[CC]YY]MMDDhhmm[.ss] 형식의 특정 시간을 사용
-t STAMP
전체 옵션[편집]
- change only the access time
-a
- do not create any files
-c, --no-create
- parse STRING and use it instead of current time
-d, --date=STRING
- change only the modification time
-m
- use this file's times instead of current time
-r, --reference=FILE
- use [[CC]YY]MMDDhhmm[.ss] instead of current time
-t STAMP
- change the specified time: WORD is access, atime, or use: equivalent to -a WORD is modify or mtime: equivalent to -m
--time=WORD
- display this help and exit
--help
- output version information and exit
--version
참고[편집]
<references/>