Moving imported photos to external drive

I’ve been importing my DSLR photos using the standard Photos.app. Now I’m running out of HDD space. What’s the best way to move my RAW photos to an external storage device?

Answer

I was looking for an intuitive “grandma could do it” GUI solution, but I ended up doing:

find / -iregex '^.*\.cr2$' -exec zip cr2.zip {} \; -delete 2>/dev/null

Then used the GUI to click & drag the .zip archive to the external USB HDD, mounted at /Volumes/disk2/.

Looks like all the images imported directly from the DSLR are stored in ~/Pictures/Photos\ Library.photoslibrary/Masters/. So in hindsight; to target the specific directory, instead of searching the entire filesystem, I would input the relevant path:

find ~/Pictures/Photos\ Library.photoslibrary/Masters/ -iregex '^.*\.cr2$' -exec zip cr2.zip {} \; -delete 2>/dev/null

Or even better, eliminate the need to click and drag by including the destination path as well:

find ~/Pictures/Photos\ Library.photoslibrary/Masters/\
-iregex '^.*\.cr2$'\
-exec zip /Volumes/disk2/cr2.zip {} \;\
-delete 2>/dev/null

Or simply mv rather than zip:

find ~/Pictures/Photos\ Library.photoslibrary/Masters/\
-iregex '^.*\.cr2$'\
-exec mv {} \; /Volumes/disk2/ 2>/dev/null

Attribution
Source : Link , Question Author : voices , Answer Author : voices

Leave a Comment