I have multiple folders with files. I would like all the files in one folder. How do i do this? I tried mv *(extension) /path to current folder but mv doesn't look into folders.
Asked
Active
Viewed 49 times
1 Answers
0
find . -name *.ext -type f -exec mv '{}' folder/. \;

Matthew Schuchard
- 25,172
- 3
- 47
- 67
-
Appreciate it. Could you give an example for me please? – user1163859 Jun 23 '16 at 10:51
-
Just replace `ext` with the extension you wanted when you posted the question above and `folder` with the folder you wanted in the question above. I had to be general on both because you were general on both in the question. – Matthew Schuchard Jun 23 '16 at 11:27