Baby got too much back
March 2, 2009 8:53 AM Subscribe
How can I consolidate all my pictures, music, pdf files, etc. from multiple drives? I have about 10 external drives containing photos and so forth. Different drives contain some duplicates, but the individual drives do not.
Say I want to copy the files from DRIVE1, DRIVE2, etc. to UBERDRIVE, which has room for everything. My first thought was
cd /Volumes/DRIVE1; find . -name "*.jpg" -exec cp {} /Volumes/UBERDRIVE/Pictures/ \;
and then repeating the process for DRIVE2 and so on.
I tried this for DRIVE1, and it seems to be really slow. (It's taken 10 hours thus far to find 100,000 jpgs on a new MacBook Pro.) Also, I think my current procedure will overwrite files with the same name, even if they're different files.
Does anyone have a better approach? Thanks!
I'm running Leopard, but I also have machines running Vista, XP, and Fedora 10.
posted by lukemeister to computers & internet (5 answers total) 3 users marked this as a favorite
2. When dealing with files like this, quote the {} in case you have embedded spaces
3. File ops over 100,000 files will be slow regardless of how you do it.
4. Your process will also flatten any subdirectories (and it's an unusually bad idea to put 100,000 files into the same directory), and overwrite files with the same name. See point #1.
posted by devbrain at 9:05 AM on March 2, 2009