0

I have a lot of .iso files in different directories on my computer and I want to move them all at once to some folder. What I would use for searching those file is find and mv to move it. The obvious way of doing this would be

find / -name "*.iso" | mv --target-directory=/home/ISO/

but it doesn't work. Any ideas?

Razwill
  • 23
  • 4

2 Answers2

2

find / -name "*.iso" -exec mv {} /home/ISO/ \;

Cornholio
  • 166
0

You can use

find / -name "*.iso" -exec mv -t /home/ISO/ "{}"  +

It will find all files ending with iso, and will move them to directory /home/ISO.

Prvt_Yadav
  • 5,882