terminal zip 1

terminal zip

# to compress
tar -zcvf archive_name.tar.gz folder_to_compress
# to extract
tar -zxvf archive_name.tar.gz

# the "v" flag is for verbose and is not required

Here is what the above code is Doing:
1. tar -zcvf archive_name.tar.gz folder_to_compress
– tar is the command to create a tar file
– z is the flag to compress the tar file
– c is the flag to create a new tar file
– v is the flag to be verbose
– f is the flag to specify the file name
2. tar -zxvf archive_name.tar.gz
– tar is the command to create a tar file
– z is the flag to compress the tar file
– x is the flag to extract the tar file
– v is the flag to be verbose
– f is the flag to specify the file name

Similar Posts