0

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

Seth
  • 59,332
Drew
  • 601

3 Answers3

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
  • 591
  • 1
  • 8
  • 15
0

Lazy man's way is to delete the junk files first.

find . -name "*.java" -type f|xargs rm -f
find . -name "*.txt" -type f|xargs rm -f
muru
  • 207,228
K7AAY
  • 17,705
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,996
  • 12
  • 32
  • 43
Drew
  • 601