# Basic syntax:
tar -zxvf file.tar.gz
# Where:
# - x tells tar to extract the files
# - v tells the command to list all of the files in the archive
# - z tells the tar command to uncompress the file (gzip)
# - f tells tar that you are going to give it a file name to work with
tar xvzf file.tar.gz
tar -xvf file.tar.gz
tar -zxvf file_name.tar.gz
tar -xvf yourfile.tar.gz
tar -xzf file.tar.gz
tar -czvf projects.tar.gz projects/
# compress
tar czvf < archive_name >.tar.gz < path >
# extract
tar xzvf < archive_name >.tar.gz
tar xzvf < archive_name >.tar.gz -C /home/usera/tmp
tar -xvzf community_images.tar.gz
tar -xf archive.tar.gz
tar -xvzf community_images.tar.gz
Also, to extract in a specific directory
for eg. to extract the archive into a custom my_images directory .
tar -xvzf community_images.tar.gz -C my_images
tar –xvzf documents.tar.gz
tar -xvf archive.tar.gz
or
tar -xf archive.tar.gz -C /home/linuxize/files
tar -xf archive.tar.gz
tar -zxvf {file.tar.gz}
cd ~/Downloads/archive.tar.gz #first navigate to file location
tar -xzvf archive.tar.gz -C /path/to/new/directory/
#-C flag will change the extraction to a new directory.
#remove -C if you want to extract it to current location.
tar -xf archive.tar.gz -C /home/linuxize/files
tar -xvzf community_images.tar.gz
tar xvzf file.tar.gz
tar –xvf documents.tar
tar -xzf archive-name.tar.gz
cd archive-name
./configure
make
sudo make install