tar is the standard tool for creating and extracting archives on Linux.
Create an Archive
# Create gzip compressed archive
tar -czf archive.tar.gz /path/to/directory
# Create bzip2 compressed archive
tar -cjf archive.tar.bz2 /path/to/directoryExtract an Archive
# Extract gzip archive
tar -xzf archive.tar.gz
# Extract to specific directory
tar -xzf archive.tar.gz -C /destination/List Contents
tar -tzf archive.tar.gzCommon Flags
-c— create-x— extract-z— gzip compression-j— bzip2 compression-f— specify filename-v— verbose (show files)-t— list contents