이 내용은 맥(Mac) 환경에만 해당된다.
사진이나 동영상을 수정, 복사 하다보면 파일의 생성시간이 바뀐다. 보통 생성 시간 역순으로 정렬하는데, 이런 정렬 방식에 어긋나는 녀석이 생긴다. 보통의 사진 편집툴은 생성시간이나 수정시간을 변경할 수 있는 기능을 제공하지만 굳이 시간 변경을 위해 편집툴을 이용할 필요가 없다.
맥에서는 커맨드로 SetFile을 제공한다. 다만 이걸 사용하기 위해서는 Xcode의 CLI 패키지를 설치해야 한다. (개발자 말고 일반 사용자에게는 이게 더 번거로울지도 모르겠다.)
$ SetFile
Usage: SetFile [option...] file...
-a attributes # attributes (lowercase = 0, uppercase = 1)*
-c creator # file creator
-d date # creation date (mm/dd/[yy]yy [hh:mm[:ss] [AM | PM]])*
-m date # modification date (mm/dd/[yy]yy [hh:mm[:ss] [AM | PM]])*
-P # perform action on symlink instead of following it
-t type # file type
Note: The following attributes may be used with the -a option:
A Alias file
B Bundle
C Custom icon*
D Desktop*
E Hidden extension*
I Inited*
M Shared (can run multiple times)
N No INIT resources
L Locked
S System (name locked)
T Stationery
V Invisible*
Z Busy*
Note: Items marked with an asterisk (*) are allowed with folders
Note: Period (.) represents the current date and time.
Note: [yy]yy < 100 assumes 21st century, e.g. 20yy
사용은 다음과 같이~
$ SetFile -d "01/03/2013 21:44:48" 2013-01-03\ 21.44.48.mov
'Mac' 카테고리의 다른 글
| 맥 Finder나 open 에서 숨겨진 파일 보기 (0) | 2013.04.23 |
|---|---|
| 맥용 메모리 청소 어플 == purge (0) | 2012.10.25 |
| Xcode 4.5 글자가 이상할 때 (0) | 2012.09.13 |