Advertisement
v1ral_ITS

easily find any file ext and copy to anywhere else

Jul 14th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.20 KB | None | 0 0
  1. #!/bin/bash
  2. [ "$UID" -eq 0 ] || exec sudo "$0" "$@"
  3. echo -e "What File Extension Type: "
  4. read EXT
  5. echo -e "\nNew Destination Copy Direcotry: \n"
  6. read newDir
  7. find / -iname *.$EXT -exec cp {} $newDir \;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement