Advertisement
v1ral_ITS

tar.curdir.sh

Apr 30th, 2019
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.88 KB | None | 0 0
  1. #!/bin/bash
  2. # ImPerial TeK Solutions (ITS)
  3. # Copyright (c) 2018 v1ral #<ImPerialTeKSolutions@outlook.com>
  4.  
  5. #########################################################################################################################
  6. # This script is very fast terminal way of backing up and moving large files and directories                #
  7. #########################################################################################################################
  8.  
  9. #########
  10. # START #
  11. #########
  12.  
  13. cd "$(yad --file-selection --directory)"
  14. (tar cf - $(pwd) \
  15. | pv -n -s $(du -sb . | awk '{print $1}') \
  16. | gzip -9 > `whoami`.tgz) 2>&1 \
  17. | yad --width 300 --height 100 --title "Progress .tgz Current Directory" --progress 'Progress' 7 70 && echo Processing...
  18. sleep 2
  19. echo
  20. echo
  21. NEW_NAME="$(yad --title "New File Name: do not include .tgz" --text "New NAME" --entry)"
  22. mv "`whoami`.tgz" $NEW_NAME.tgz
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement