images creation date newer than last modified date
I have recently switched my desktop environment over to Ubuntu from windows xp. I must say that I haven't had this much fun since going from windows 3.1 to windows 95!
I am having a minor difficulty and can't seem to figure it out. I am currently setting up digikam to manage my photo collection. I noticed in the calendar view that I have about 200 or so pictures that have a creation date that is newer then the last modified date.
I was wondering how to swap the values. I have always named my pictures with the dates in the names and the last modified date is the date these pictures were taken.
Is there an easy way to accomplish this? If not what tools would I need to be able to extract the creation time and last modified time so that I can re-write the values using some sort of script. I also noticed (through digikam) that these images don't have any exif information (or any metadata) stored within the pictures. So the dates that digikam is using are the actually file dates.
Hello and welcome!
stat would be a good tool to use
heres an example;
[root@foo01 foo]# stat foo.sh
Size: 1328 Blocks: 8 IO Block: 4096 regular file
Device: 811h/2065d Inode: 605539 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 1006/ foo) Gid: ( 10/ wheel)
Access: 2009-07-24 14:26:01.000000000 +0100
Modify: 2009-07-24 14:25:35.000000000 +0100
Change: 2009-07-24 14:25:42.000000000 +0100
dxangel, thanks for the reply.
You information about stats was what I was looking for.
Here is the results of the stats on one of the images that is causing problems.
I coded up some python that searches a folder for images that have an access date that is newer then the modified, but I don't know how to reset all of the time values to match?
Figured out how to do this. Just add this line:
|All times are GMT -5. The time now is 05:35 PM.|