|
|
Need some Unix find help.
|
|
|
|
Moderator Emeritus
Join Date: Apr 2001
Location: Wasilla, Alaska
Status:
Offline
|
|
I have a client with an extremely broken iPhoto library. All attempts at rebuilding the database fail. We would like to somehow extract all photos from the "Originals" folders. This is iPhoto v5, so there are like 40 "originals" folders.
I'm thinking there must be a way to use the 'find' command to locate all .jpg files in 'originals'. Something along the lines of this:
find /Users/francine/Ttest -name *.png -exec cp '{}' /Users/francine/Desktop/screens/ \;
finds all files with the extension ".png" in the folder Ttest and its sub-folders and copies them to the folder "screens"
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
Something like:
[codex]find "/path/to/iPhoto Library" -path "*/Originals/*" -name "*.jpg"[/codex]
The -exec cp and all that is exactly the same.
(
Last edited by Chuckit; Nov 21, 2007 at 08:24 PM.
)
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
|
|
|
|
|
|
|
Moderator Emeritus
Join Date: Apr 2001
Location: Wasilla, Alaska
Status:
Offline
|
|
Worked like a charm. 8K photos recovered.
Thanks Chuckit.
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
If you want the search to include png and gif images too:
Code:
find "/path/to/iPhoto Library" -path "*/Originals/*" -regex ".*?\.(jpg|png|gif)"
ought to work...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|