mqnoy

make tar gz

Jun 28th, 2018
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.59 KB | None | 0 0
  1. To create a tar.gz archive from a given folder you can use the following command
  2. tar -zcvf tar-archive-name.tar.gz source-folder-name
  3.  
  4. This will compress the contents of source-folder-name to a tar.gz archive named tar-archive-name.tar.gz
  5.  
  6. To extract a tar.gz compressed archive you can use the following command
  7. tar -zxvf tar-archive-name.tar.gz
  8.  
  9. This will extract the archive to the folder tar-archive-name.
  10.  
  11. To Preserve permissions
  12. tar -pcvzf tar-archive-name.tar.gz source-folder-name
  13.  
  14. Switch the ‘c’ flag to an ‘x’ to extract (uncompress).
  15. tar -pxvzf tar-archive-name.tar.gz
Advertisement
Add Comment
Please, Sign In to add comment