Advertisement
v1ral_ITS

Easily cp -R any size file or folder to anywhere else

Jun 28th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.29 KB | None | 0 0
  1. #!/bin/bash
  2. if [[ $UID -eq 0 ]]; then
  3. SRC=$(zenity --title "Source Directory" --text "Directory: " --entry )
  4. DEST=$(zenity --title "Destination Directory" --text "Destination: " --entry )
  5. (cd "$SRC"; tar cf - .) | (cd "$DEST"; tar xpf -)
  6. else
  7. echo -e "Sorry Bro...........\nROOT OnLY!"
  8. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement