Manipulating file dates

Renata Rocha natzilla-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Tue Mar 30 19:22:01 UTC 2010


On Tue, Mar 30, 2010 at 15:13, Renata Rocha <natzilla-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:
> On Sat, Mar 27, 2010 at 15:03, Giles Orr <gilesorr-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:
>> I'll shortly be boarding a flight back to Toronto, at which time I'll
>> have about a thousand photos with the wrong time stamp on them (I
>> never remember to reset the camera until about five days have passed).
>>  All the photos have a Toronto time stamp on them, when what I need is
>> six hours later.  I admit I'm sitting at a Windows computer in a hotel
>> and haven't attempted to research this myself, but I've looked at it
>> in the past and the process was a bit confusing.  As I recall, I would
>> need to get the time from the file, convert to seconds since the
>> computer epoch (some time in 1969?, although I think that's immaterial
>> in this context?), add 6*60*60 seconds, then convert back to date
>> format.  Looping through the files with touch is no problem, but help
>> with the date manipulation under Bash would be much appreciated.
>
> I'm pretty sure you won't need to change the files' date, but the jpg
> headers info.
>
> There's a command line tool named "exif" (self-describing)  which
> deals with exif headers. May be useful for what you need.

I just installed it and I believe it makes exactly what you're looking for:

exif  --ifd=EXIF  --tag  0x9003  --set-value=’2007:09:17 09:30:55’ picture.jpg
              Set EXIF tag 0x9003 (DateTimeOriginal) to the given
value, writing the new file to picture.jpg.modified.jpg

I hope this may have helped you!

-- 
Renata Rocha
re-9siASaY8nq0dnm+yROfE0A at public.gmane.org
http://www.linkedin.com/in/renatarocha
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list