Advertisement
rcmaehl

move here

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