Skip to content
Advertisement

How do you move files from one folder to the other?

I am trying to move specific files from one folder to another. Would the below work?

mkdir test

touch test1.sh
touch test2.sh
touch test3.sh

mkdir test2

find test/ | xargs -I% mv % test2

Advertisement

Answer

I think this can work:

find ./ -name "test*.sh" | xargs -I% mv % test2
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement