Last active
March 19, 2021 17:32
-
-
Save midwire/423aae1718a9d56e0782a7f7e6bebec9 to your computer and use it in GitHub Desktop.
[Tar Gzip Files] Create, Decompress *.tar.gz files #tar #linux #devops
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For a couple files.. | |
tar -czf archive.tar.gz file1 file2 | |
# For an entire directory - recursively | |
tar -cfz archive.tar.gz directory_path | |
# Create an archive and send to another host over SSH - extract it there | |
tar cvf - project | ssh user@ip_addr "tar xv -C /var/www" | |
# Extract a tar.gz file | |
tar -xvf archive.tar.gz [optional list of files and dirs] | |
# With wildcards | |
tar -xf archive.tar.gz --wildcards '*.js' | |
# Remote archives | |
wget -c https://download.blender.org/source/blender-2.80.tar.gz -O - | sudo tar -xz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment