All » Articles » Linux (5)

How to adjust dates in photo EXIF headers (and copy to file date)

Posted by: Ferenc Veres on August 20, 2012 08:28:12 PM +00:00(4216 Reads)

Have you ever had the problem that your camera's date was misset or reset, so all your EXIF and file dates were broken?

In this case you need to adjust the date in several images and preferably alter the file date accordingly. This is much easier than you thought, two simple commands using Linux tool exiv2.

 

Most Linux distributions provide packaged version of exiv2. Check out your package manager. There is also a Windows version for download.

exiv2 -Y 32 -O 4 -D 24 -a 19:00 ad *.JPG

This command will move date in all JPG files by 32 years, 4 months, 24 days and 19 hours. (Well, my camera's date was reset to 1980.)

Now, copy EXIF date to file modification time:

exiv2 -T mv *.JPG

And finally, an easy to remember command to print EXIF info of a file:

exiv2 pr IMG_6773.JPG

On Ubuntu you can install the exiv2 command by:

sudo apt-get install exiv2

To read more run

exiv2 --help

About me

Photo of me Ferenc Veres
web developer
about me

Commodore books
Commodore logo My C64 and Plus/4 book collection (Hungarian): Commodore könyvek
Featured article

Exisitng editors for text data DjVu files are quite limited, like for example DjVuSmooth. So I've implemented a new editor in JavaScript, that allows editing both the strucutre of the text (paragraphs, lines, words,...) and the coordinates of the text boxes by simply dragging with the mouse, features like create, delete, merge are also available.

My other websites
Categories