How to retrieve EXIF data from the command line in Ubuntu Linux

If you want to make use of the EXIF data stored in a JPEG (.jpg or .jpeg) or TIFF (.tif or .tiff) file from the command line in Ubuntu Linux — or most other Linux variants — here’s how.

This was tested on Ubuntu 11.10 (Oneiric Ocelot).

First, you will need to have imagemagick installed to provide the identify command.

sudo apt-get install imagemagick

Next, you can retrieve the data on an image with the following example:

identify -verbose /usr/share/backgrounds/WildWheat_by_Brian_Burt.jpg

If you want just the EXIF data, you can use something like the following:

identify -verbose /usr/share/backgrounds/WildWheat_by_Brian_Burt.jpg | grep "exif:"
Advertisements

, , ,

  1. #1 by Tomek D. on March 3, 2013 - 4:03 pm

    It is very slow because IM loads whole image to read EXIF. Try with 20 Mpix NEF or DNG.
    Better use ExifTool.

  1. Linux Command Lines Pep Talk | EssayBoard