ExifTool Guide


ExifTool – Guide and Functions

ExifTool is a powerful command-line tool for reading, writing, and editing metadata in image, video, and document files.


1. Installing ExifTool

Install ExifTool on Linux using the following command:

> sudo apt install exiftool

2. Reading Metadata

To display all metadata of a file:

> exiftool image.jpg

3. Extracting Specific Metadata

To extract a specific metadata field, such as the camera model:

> exiftool -Model image.jpg

4. Modifying Metadata

Change the author name in an image file:

> exiftool -Artist="New Author" image.jpg

5. Removing Metadata

To remove all metadata from an image:

> exiftool -all= image.jpg

6. Copying Metadata from One File to Another

To copy metadata from one file to another:

> exiftool -TagsFromFile source.jpg target.jpg

7. Bulk Editing Metadata

Change the author name for all JPG files in a folder:

> exiftool -Artist="New Author" *.jpg

8. Removing GPS Data

To remove GPS location data from an image:

> exiftool -gps:all= image.jpg

9. Viewing Metadata in JSON Format

To display metadata in JSON format:

> exiftool -json image.jpg

10. Automated Script

A Bash script to extract metadata from all images in a folder:

> #!/bin/bash
> read -p "Enter directory path: " dir
> for file in "$dir"/*.jpg; do
>     exiftool "$file" > "$file.txt"
> done

Download from GitHub


11. Removing Metadata from All Images in a Directory

A Bash script to remove all metadata from every image in a directory:

> #!/bin/bash
> read -p "Enter directory path: " dir
> for file in "$dir"/*.jpg; do
>     exiftool -all= "$file"
> done

Download from GitHub