aheckler
June 12th, 2008, 03:47 PM
Question for a friend:
I have a computer that has been heavily used by many people for photo and video editing and so forth. But now I am getting a new one, so I need to back up all these photos, videos, etc. The problem is that the files are scattered all throughout the drive, making it impractical to hunt them down by hand and copy them over. What would be the best way to approach this using the terminal?
Basically what I want to do is specify filetypes, have OS X find every single file of that type on the system, then copy it over to an external drive. Space is not an issue here, so I don't care if there are ten, twenty, or even a hundred "false positive" images copied.
I'm thinking the best way to do this would be using "find" or "locate", but I'm not familiar enough with OS X to be sure of this.
Something like this for .jpg files maybe?
find / -name "*.jpg" -exec cp {} /path/to/backup
And then just repeat that for every filetype?
I have a computer that has been heavily used by many people for photo and video editing and so forth. But now I am getting a new one, so I need to back up all these photos, videos, etc. The problem is that the files are scattered all throughout the drive, making it impractical to hunt them down by hand and copy them over. What would be the best way to approach this using the terminal?
Basically what I want to do is specify filetypes, have OS X find every single file of that type on the system, then copy it over to an external drive. Space is not an issue here, so I don't care if there are ten, twenty, or even a hundred "false positive" images copied.
I'm thinking the best way to do this would be using "find" or "locate", but I'm not familiar enough with OS X to be sure of this.
Something like this for .jpg files maybe?
find / -name "*.jpg" -exec cp {} /path/to/backup
And then just repeat that for every filetype?