jhead has worked for me in the past.
% apt-cache show jhead [...] Description: manipulate the non-image part of Exif compliant JPEG files jhead is a command line driven utility for extracting digital camera settings from the Exif format files used by many digital cameras. It handles the various confusing ways these can be expressed, and displays them as F-stop, shutter speed, etc. It is also able to reduce the size of digital camera JPEGs without loss of information, by deleting integral thumbnails that digital cameras put into the Exif header.
Example:
% for file in ??-??-??_????.jpg; do timestamp=$(echo $file | sed -e 's/^/20/ ; s/-/:/g ; s/_\([0-2][0-9]\)\([0-5][0-9]\).*$/-\1:\2:00/') echo Before: jhead $file jhead -mkexif -ts$timestamp $file echo After: jhead $file done Before: File name : 08-09-10_1234.jpg File size : 356059 bytes File date : 2010:11:13 15:22:14 Date/Time : 2010:11:13 15:22:00 Resolution : 3000 x 2274 Color/bw : Black and white Modified: 08-09-10_1234.jpg After: File name : 08-09-10_1234.jpg File size : 356059 bytes File date : 2010:11:13 15:22:14 Date/Time : 2008:09:10 12:34:00 Resolution : 3000 x 2274 Color/bw : Black and white