exif 정보 수정은 맥과 윈도우 모두 지원하는 프로그램으로 ExifTool을 사용하는게 가장 간편하다.
간단히 파일의 날짜 수정은 맥의 경우 xcode command line tool 를 통해 SetFile, touch 로 수정할 수 있다.
ExifTool by Phil Harvey
0 (Information Type) AAC, AFCP, AIFF, APE, APP0, APP1, APP11, APP12, APP13, APP14, APP15, APP2, APP3, APP4, APP5, APP6, APP7, APP8, APP9, ASF, Audible, Canon, CanonVRD, Composite, DICOM, DNG, DV, DjVu, Ducky, EXE, EXIF, ExifTool, FITS, FLAC, FLIR, File, F
exiftool.org
xcode command line tool 설치
xcode-select --install
ExifTool
정보확인
exiftool -l path/file
날짜확인
exiftool -time:all path/file
특정일로 변경
exiftool -CreateDate='yyyy:mm:dd hh:mm:ss' path/*
exiftool -DateTimeOriginal='yyyy:mm:dd hh:mm:ss' path/*
특정 태그값으로 설정
exiftool '-DateTimeOriginal<CreateDate' path/*
exiftool '-FileCreateDate<CreateDate' path/*
exiftool '-FileModifyDate<CreateDate' path/*
// 모든 시간을 생성시간으로 변경
exifTool '-time:all<CreateDate' path/*
exifTool '-AllDates<CreateDate' path/*
조건문
exiftool -AllDates+=1:30 -if '$CreateDate ge "2020:01:01"' path
기타 옵션
-overwrite_original : 임시파일을 원본파일로 교체
-overwrite_original_in_place : 임시파일을 원본파일로 교체하나 원본 파일 정보 유지
다른파일 태그 복사
exiftool -TagsFromFile source-file -AllDates target-file
파일 변경
SetFile 로 파일 생성일 변경
SetFile -d 'mm/dd/yyyy hh:mm:ss' path/file
touch를 사용한 수정일 변경
touch -mt yyyymmddhhmm ./*.jpg
'시스템 > Macos' 카테고리의 다른 글
rename 을 사용한 파일명 변경 (0) | 2023.07.24 |
---|---|
터미널 iTerm2 , oh-my-zsh 설정 (0) | 2023.04.12 |