From Electron Cloud
Jump to: navigation, search
(Problems to be solved)
(Problems to be solved)
Line 11: Line 11:
 
...
 
...
 
</pre>
 
</pre>
so, initially, the files all have the correct dates and times, because -a preserves date, time, permission, and ownership.  Now suppose I touch up a picture in Gimp and re-save it.  The time and date are changed to when I did the touch-up.  Linux filesystems don't preserve the original date and time at all.  It continues to exist in the exif tags (as long as those are preserved during all the editing operations) but that is beside the point; if I do ll -rt, they are listed in the wrong order.
+
so, initially, the files all have the correct dates and times, because -a preserves date, time, permission, and ownership.  Now suppose I touch up a picture in Gimp and re-save it.  The time and date are changed to when I did the touch-up.  Linux filesystems don't preserve the original date and time at all.  It continues to exist in the exif tags (as long as those are preserved during all the editing operations) but that is beside the point; if I do ls -lrt, they are listed in the wrong order.
  
 
==Current workarounds==
 
==Current workarounds==

Revision as of 16:57, 12 August 2006

Problems to be solved

  • Current-model Canon cameras have gotten even more stupid than old ones regarding the naming of photos on the memory card. My Powershot A50 would remember (via in-camera memory, apparently) how many pictures it has taken during its entire life, so, say, if aut_3902 was the last picture I took, and then I insert a different memory card, the next picture will still be aut_3903. This is as it should be. The SD300, however, always starts over from zero. So you end up with a lot of img_0001.jpg, over and over and over again, every time you delete anything from the SD card. It's otherwise a decent camera but this is really, really stupid of them.
  • The typical filesystem (on Linux or otherwise) doesn't go to any great effort to preserve the original date and time of a file. E.g. I would typically copy my pictures like this:
cd ~/pics
mkdir 200607-timbuktoo-trip-1
mount /mnt/sd0
cp -a /mnt/sd0/dcim/100canon/* 200607-timbuktoo-trip-1/
cp -a /mnt/sd0/dcim/101canon/* 200607-timbuktoo-trip-1/
...

so, initially, the files all have the correct dates and times, because -a preserves date, time, permission, and ownership. Now suppose I touch up a picture in Gimp and re-save it. The time and date are changed to when I did the touch-up. Linux filesystems don't preserve the original date and time at all. It continues to exist in the exif tags (as long as those are preserved during all the editing operations) but that is beside the point; if I do ls -lrt, they are listed in the wrong order.

Current workarounds

I just discovered the quite useful ExifTool.

cd ~/pics/200607-timbuktoo-trip-1
exiftool -r  -d %Y%m%d-%H:%M:%S.%%e "-filename<CreateDate" -o . /mnt/sd0

This I can do repeatedly for each SD card that I used, and as long as the date and time on the camera were correct, I will get files of the form 20060721-11:50:12.jpg. Now that the Canon numbering is completely useless (due to endless repetition) I don't see any point in preserving it. And if I cannot preserve the date and time on the filesystem, at least I can preserve it by putting it in the name. If I want to rename a picture to something more descriptive, I can still just add descriptive text onto the end of the name. (But usually I don't bother.)