Remove EXIF Metadata from Photos with exiftool
Productivity Sauce
Sometimes, it is a good idea to scrub EXIF metadata from photos before sharing them, and there is no better tool for the job than exiftool. The command below nukes all EXIF metadata in a photo in one fell swoop (replace foo.jpg with the actual file name):
exiftool -all= foo.jpg
This command removes EXIF metadata from the specified photo, but what if you need to process multiple photos? Then you can use the following command which cleans all the photos in the current directory:
for i in *.jpg; do echo "Processing $i"; exiftool -all= "$i"; done
Instead of purging all EXIF metadata from a photo, you can also remove individual fields. For example, the following command can come in handy when you need to remove geographical coordinates embedded in the photo:
exiftool -geotag= foo.jpg
And the command below can help you to remove geotags from multiple photos in one go:
for i in *.jpg; do echo "Processing $i"; exiftool -geotag= "$i"; done
Comments
Issue 34: Linux Shell Handbook 2019 Edition/Special Editions
Buy this issue as a PDF
News
-
VMware Rolls Out Essential PKS
Virtualization vendor brings commercial support to upstream Kubernetes.
-
Linux 5.0 Is Here
Linus says don't get excited, but the new release contains some significant updates.
-
Kali Linux 2019.1 Released
The favorite Linux distro of Mr. Robot gets the first update of 2019.
-
Linux Foundation Releases a New Draft of OpenChain Spec
OpenChain provides a standard for open source compliance throughout the software supply chain.
-
Linux Kernel Continues To Offer Mitigation for Spectre Mitigation
Kernel 4.19 has added another family of Spectre vulnerabilities to its list of mitigating the mitigation.
-
SpeakUp Trojan Targets Linux Servers
It’s exploiting a known vulnerability.
-
KDE Plasma 5.15 Beta Arrives
Major improvements to software management.
-
Canonical Announces Latest Ubuntu Core for IoT
Now offers 10 years of support.
-
GitHub Offers Free Private Repositories
Popular source code collaboration site makes a major change to feature set.
-
Linus Torvalds Welcomes 2019 with Linux 5.x
Better support for GPUs and CPUs.
other geographical data...
[code]exiftool -gps:all= *.jpg[/code]
to remove the information
ExifTool processes directories
exiftool -all= SOME_DIRECTORY
And add a -r option to recursively process subdirectories too.
This will process any type of file that is writable by ExifTool, but if you only want to process jpeg images, add "-ext jpg" and maybe "-ext jpeg" to the command. (No need to add "-ext JPG" because the -ext option is case insensitive).
More info on exiftool
exiftool -r -overwrite_original -P -all= -copyright="My Name" *.jpg *.jpeg *.JPG
Might be more to the point.