I recently recovered a drive that was corrupted. it has a ton of extra files I do not need but I do need to copy files by extension over to the new location, eg: .jpg .png .mov .mp4 .wav .pdf .doc ext, ther are held in multiple sub directories along with a lot of crap files. like .java and .txts
Asked
Active
Viewed 368 times
3 Answers
0
Open a terminal
cd /media/drew/recovered-drive/home/drew
cp -r *.jpg /home/drew/Pictures
cp -r *.mov /home/drew/Videos
etc...
Does this help?

penner
- 581
-
does not work get error "cp: cannot stat '*.jpg' No suhc file or directory" – Drew Oct 08 '13 at 22:14
-
sudo does not change the outcome... it seems that it should work though, odd – Drew Oct 09 '13 at 19:29
-
Oh... those file paths might not actually exist. I was just giving examples of what you could do. While you are typing that in, try tab competition. Or see this article for help: https://help.ubuntu.com/community/UsingTheTerminal – penner Oct 09 '13 at 20:34
0
Using rsync -avm --include='*.ext' -f 'hide,! */' "dir" "dir"
, I completed the task and made a .sh script duplicating the method for the other extensions.

Martin Thornton
- 5,431

Drew
- 601
- 1
- 6
- 24