Tar and gzip. Extract that files

Tar, tarball, gzip. A kind of tape archive, a tar file is a collection of files archived in a single ‘tarball’ file and compressing it with gzip to save disk space results in a tar.gz compressed file. Simple, no?

GNUzip is also used in HTTP compression

GNU Gzip, or gzip, is a file format and a software application used for file compression and decompression. The tar utility included in most Linux distributions can extract gzip compressed files and various other formats.

tarball. An archive, created with the Unix tar utility, containing myriad related files.

Jargon, tarball

So, a file with .tar.gz extension is a compressed archive of files. You can extract it with a single command in a terminal:

$ tar -xzf tarfile.tar.gz

If you instead want to create a compressed archive from a directory:

$ tar -czf tarfile.tar.gz <folder-name>

But, what if you having trouble remembering the tar command syntax?

  • -xzf mnemonic is Xtract Ze File
  • -czf mnemonic is Compress Ze Files

Super fun!

Leave a Reply

Your email address will not be published. Required fields are marked *