Command - compress files
Compress files using Tar
tar -czvf archive.tar.gz /path/to/directory
This will create a gzipped tarball of the directory at /path/to/directory and name it archive.tar.gz.
Extract files using Tar
tar -xvf archive.tar.gz tar -czvf archive.tar.gz /path/to/directory
This will create a gzipped tarball of the directory at /path/to/directory and name it archive.tar.gz.
tar -xvf archive.tar.gz