Last active
August 6, 2016 13:25
-
-
Save danwarfel/25ca3715d4f4c7082dd4 to your computer and use it in GitHub Desktop.
Recusively find, move, change name of specific file type in Bash
From http://stackoverflow.com/questions/14345714/recursively-moving-all-files-of-a-specific-type-into-a-target-directory-in-bash#answer-14345769
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 src/dir/ -name '*.txt' | while read file; do | |
mv "$file" "target/dir/$(tr / _ <<< "$file")" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment