Created
June 30, 2016 23:20
-
-
Save rauluranga/ee1fe693a17329752f9ec069dbba47c0 to your computer and use it in GitHub Desktop.
script for moving files from subdirs to parent dir
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 /TARGET_DIR/* -type d | xargs -n1 sh -c 'echo mv ${0}/* "$( dirname {0})" ";" rm -rvf ${0}' | sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment