TAR (Tape Archive) is a Unix archive format that combines multiple files into a single archive. TAR files are often compressed with GZIP, XZ, or BZIP2.
Basic Usage
Extract Plain TAR
Excavate::Archive.new('archive.tar').extract
Extract Compressed TAR
# TAR + GZIPExcavate::Archive.new('archive.tar.gz').extractExcavate::Archive.new('archive.tgz').extract# TAR + XZExcavate::Archive.new('archive.tar.xz').extractExcavate::Archive.new('archive.txz').extract
TAR Characteristics
Characteristic
Description
File extension
.tar, .tar.gz, .tgz, .tar.xz, .txz
Compression
None (plain), GZIP, XZ, BZIP2
Permissions
Preserves Unix permissions
Platform
Unix/Linux (primary)
Compound Format Support
Excavate handles compound TAR archives automatically:
TAR + GZIP
# Automatically extracts GZIP then TARExcavate::Archive.new('package.tar.gz').extract
TAR + XZ
# Automatically extracts XZ then TARExcavate::Archive.new('package.tar.xz').extract