Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- shopt -s extglob
- find . -mindepth 2 -type f -exec mv -it . {} +
- read -p 'delete dir structure? [Y/n] '; if [[ -z $REPLY || $REPLY = [Yy]?(es) ]]; then find . -depth -type d -empty -delete; fi
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement