Trying to extract original jpg files from IPhoto.
My wife has an aging IMac and I'm trying to back up her .jpg's from her Pictures folder. I use rsync to back up her /User folder to a home server.
I thought it would be easy. Just look in Pictures. Here's the path of a single jpg: /mnt/blah/Pictures/iPhoto\ Library/Masters/2016/07/10/20160710-213800/blah.jpg It's obviously a convoluted mess for a reason, they want to lock you into iPhoto for ever and ever. There has to be a way to burrow down into this hierarchy and copy the image files into a directory with bash, but I've been googling for over an hour and have come up empty. Is there a way to pipe the output of find to cp maybe? Thanks for looking. |
You can generally take most commands and pipe them to another operation in linux yes.
Some people used to make a text file and then check it then run it in a batch/script as input. A lot folks here are pretty good on the programming forum and can give you 20 ways to do that. Some gui/window file managers have ways to find also and then cut and paste. http://stackoverflow.com/questions/5...ed-on-wildcard |
rsync -avrc -e -i `find . -type f -name *.zip` /lx24
Works pretty well for me. Change the things as per your requirement and give a try. |
Thanks for the replies. I tried the command above but it failed, probably because of my own ignorance. So you're using rsycnc using find to copy to the directory? Cool. I'll research rsync and find again tomorrow and see if I can make it work.
Hell let's sell it to disgruntled Mac forum users. We could make a fortune. |
^ you probably have to replace *zip with *jpg, no?
anyhow, "find" can do it by itself if the photos are uniquely named: Code:
find -iname '*.jpg' -exec cp -n {} /new/folder/{} \; advanced cp utilities might exist that automatically rename. or maybe rsync is the best solution after all. |
Quote:
Hope that helps. |
Quote:
|
Quote:
The files are named after projects so, yeah,it could work. |
Actually it did work. The exact command I used was:
find /mnt/blah/Pictures/iPhoto-Library/Masters/ -name "*.jpg" -type f -exec cp {} ./Dest_Dir \; and find /mnt/blah/Pictures/iPhoto-Library/Masters/ -name "*.JPG" -type f -exec cp {} ./Dest_Dir \; Thanks for the input guys. This was fun. |
Quote:
please understand that cp will overwrite files with the same name, unless you use the -n flag. and if you do use the -n flag, duplicate filenames are skipped silently. i guess you could use the -i flag (interactive, see man cp) to make sure ALL files are copied. |
All times are GMT -5. The time now is 11:24 AM. |