Skip to content

Instantly share code, notes, and snippets.

@scorpp
Last active December 16, 2015 00:09
Show Gist options
  • Save scorpp/5345711 to your computer and use it in GitHub Desktop.
Save scorpp/5345711 to your computer and use it in GitHub Desktop.
Move all resource file from src/main/java to src/main/resources Needed sort files that way while migrating existing java projects to maven build system
find ./*/src/main/java/ -type f ! -name *.java | xargs -n 1 -P 1 -I{} bash -c "newdir=\$(echo \"\$(dirname {})\" | sed 's/src\/main\/java/src\/main\/resources/'); mkdir -p \$newdir; git mv {} \$newdir"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment