How To Install and Use exiftool In Linux, Windows, Kali, Ubuntu, Mint with Examples
exiftool is a platform independent command line and GUI application for reading, writing and editing meta information of images and media files. Metadata information can be GPS coordinates, tags, creation time, edit time, device name etc.
exiftool supports most of the operating systems like Windows, Ubuntu, Fedora etc. We will install exiftool in this part.
Ubuntu, Debian, Mint, Kali
exiftool is provided from the package named
libimage-exiftool-perl. So we will install with apt command like below.
$ sudo apt install libimage-exiftool-perl
Fedora, CentOS, RedHat
exiftool is provided with the package name
$ sudo dnf install perl-Image-ExifTool.noarch
We can download the exiftool for Windows operating systems from the following URL. This zip file provides a single executable file without any installation.
We just need to extract the file with WinZip, 7zip, WinRAR etc.
The Syntax of the exiftool is like below. We can see that there is 4 different syntax for different use cases like reading metadata, writing metadata, copying metadata and other operations.
List All Metadata of Given Image/File
We can list all metadata by providing the file we want to inspect. In this example, we will list all metadata of
Tux.png. As we can see this is a png file which is an image format.
$ exiftool Tux.png
As we can see there are a lot of metadata from a simple png file.
ExifTool Version Numberspecifies the version of the tool which is 11.10
File Namespecifies the name of the file which is Tux.png
Directoryspecifies the path which is the current working directory.
File Sizespecifies the size of the given file which is 37 kB
File Modification Date/Timespecifies the modification date and time which is
File Access Date/Timespecifies the access date and time which is
FileInode Change Date/Timespecifies the Inode or disk change date and time which is
File Permissionsspecifies current user, group and other permissions of the file which is
File Typespecifies the type of the file which is
PNGin this case
File Type Extensionspecifies the extension of the file which is
pngin this example.
MIME Typespecifies the mime code of the file which is
image/ngin this example
Image Widthspecifies the width pixel count of the given image which is 300 in this case.
Image Heightspecifies the height pixel count of the given image which is 354 in this case.
Bit Depthspecifies the pixel bit or quality which is 8 bit in this example.
ColorTypespecifies the color representation which is
RGB with Alphain this case
Compressionspecifies the compression type of the given image which is
Deflate/Inflatein this example.
Filterspecifies the filter type.
Background Colorspecifies the RGB representation which is
255 255 255.
Modify Datespecifies the date the image modifies in original which is
Datecreatespecifies the creation date and time of the original image
Datemodifyspecifies the modification date and time of the original image
Megapixelsspecifies the megapixel or pixel count in mega format which is 0.106 in this case.
Export Metadata Into HTML File
We can export metadata of given files or images into an HTML file format with the
-h option. In this example, we will export metadata of
Tux.png into HTML name Tux.html.
$ exiftool -h Tux.png > Tux.html
List Metadata In CSV Format
We can print given file and images metadata in CSV format. This can be a single file or image or a whole directory which can contain multiple files and image. In this example, we will print
$ exiftool -csv /home/ismail/Downloads/
List Specific Metadata
We can also list and print specific metadata by using
grep command. In this example, we will print
Image Width metadata.
$ exiftool Tux.png | grep "Image Width"
We can also write or overwrite metadata of the given file. In this example, we will overwrite the
Rights metadata of
$ exiftool -overwrite_original -rights="©2019 Poftut.com" All.doc