ExifTool is a powerful and versatile tool for reading, writing, and manipulating image, audio, video, and PDF metadata. It is available as both a Perl library (Image::ExifTool) and command-line application, and is platform independent. It can be used on Ubuntu 22.04 LTS Jammy Jellyfish to read, modify, and manipulate metadata of images, audio, video, and PDF files.
To install ExifTool on Ubuntu 22.04, first make sure that all system packages are up-to-date by running the following apt commands in the terminal:
sudo apt-get update && sudo apt-get upgrade
Then, execute the command
sudo apt install exiftool -y to install ExifTool
from the Ubuntu 22.04 repository.
Once installed, some basic commands to use ExifTool include extracting information from a file (exiftool a.jpg), adding an IPTC keyword in a pipeline (cat a.jpg | exiftool -iptc:keywords+=fantastic – > b.jpg), and setting ExifTool API options (-api OPT[=VAL]). Advanced options allow complex processing to be performed from a single command without the need for additional scripting.
The -args option outputs information in the form of exiftool arguments, suitable for use with the –@ option when writing. The -b option outputs requested metadata in binary format without tag names or descriptions, and the -c FMT option sets the print format for GPS coordinates.
ExifTool exits with a status of 0 on success, or 1 if an error occurred or if all files failed the -if condition. It is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Here are some practical CLI examples for removing metadata from an image using ExifTool:
Remove all metadata:
exiftool -all= image.jpg
Remove specific metadata tags:
exiftool -xmp:Subject= -xmp:Creator= -xmp:Author= image.jpg
Remove metadata from multiple images:
exiftool -all= *.jpg
Remove metadata and create a backup of the original image:
exiftool -all= -o .bak image.jpg
Note: The -all= option removes all metadata from the image and the -o .bak option creates a backup of the original image with the extension .bak.
Citations :
- https://www.linuxcapable.com/how-to-install-exiftool-on-ubuntu-22-04-lts/
- https://manpages.ubuntu.com/manpages/trusty/en/man1/exiftool.1p.html
- https://exiftool.org/under.html
- https://linuxopsys.com/topics/install-and-use-exiftool-on-linux
- https://idroot.us/install-exiftool-ubuntu-22-04/
- https://docs.bitnami.com/ibm/apps/resourcespace/configuration/install-exiftool/
- https://en.wikipedia.org/wiki/ExifTool
- https://adamtheautomator.com/exiftool/