Last active
August 29, 2015 14:04
-
-
Save myfavouritekk/7b5b5c6409fd263e54e8 to your computer and use it in GitHub Desktop.
Linux/Unix: Compress and copy
This file contains 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
# Use tar to direct output to standard output "-" and use gzip to compress | |
tar -cf - <source_file> | gzip -1 > <destination_file> | |
# Same effect, be sure to put <destination_file> directly behind -f option | |
tar -czf <destination_file> <source_file> | |
# Untar | |
tar -xzf <tar_file> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment