Created
June 16, 2018 21:13
-
-
Save r-pufky/6c1ea3c2c83294c73f0e7bd62a433340 to your computer and use it in GitHub Desktop.
Move files in directory to <filename>/file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type f -prune -exec sh -c 'mkdir -p "${0%.*}" && mv "$0" "${0%.*}"' {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment