mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-18 05:15:24 +02:00

* exiftool: Add "-gps*=" removal example A common use of exiftool is removing location data from photos. One may wish to preserve most EXIF data (ex. rotation, date/time taken, etc.) but remove private location data. This example accomplishes this common task. The proposed example comes from exiftool's author, Phil Harvey: https://exiftool.org/forum/index.php?topic=6037.msg29731#msg29731 This example works to not only remove GPS data from EXIF but also from Adobe's XMP tags. Tested with JPEG and HEIC photos using exiftool 12.50.
1.2 KiB
1.2 KiB
exiftool
Read and write meta information in files. More information: https://exiftool.org.
- Print the EXIF metadata for a given file:
exiftool {{file}}
- Remove all EXIF metadata from the given files:
exiftool -All= {{file1 file2 ...}}
- Remove GPS EXIF metadata from given image files:
exiftool "-gps*=" {{path/to/image1 path/to/image2 ...}}
- Remove all EXIF metadata from the given image files, then re-add metadata for color and orientation:
exiftool -All= -tagsfromfile @ -colorspacetags -orientation {{image1 image2 ...}}
- Move the date at which all photos in a directory were taken 1 hour forward:
exiftool "-AllDates+=0:0:0 1:0:0" {{path/to/directory}}
- Move the date at which all JPEG photos in the current directory were taken 1 day and 2 hours backward:
exiftool "-AllDates-=0:0:1 2:0:0" -ext jpg
- Only change the
DateTimeOriginal
field subtracting 1.5 hours, without keeping backups:
exiftool -DateTimeOriginal-=1.5 -overwrite_original
- Recursively rename all JPEG photos in a directory based on the
DateTimeOriginal
field:
exiftool '-filename<DateTimeOriginal' -d %Y-%m-%d_%H-%M-%S%%lc.%%e {{path/to/directory}} -r -ext jpg