Tar option summary

The basics:

  • x – extract files
  • c – compress files
  • t – list files
  • v – verbose (list files as it processes them)
  • j – use bz2 compression
  • z – use gz compression
  • f – read or write files to disk


Uncompress a tar.gz file: tar zxf tarball.tar.gz

Uncompress a tar.bz2 file: tar jxf tarball.tar.bz2

Create a tar.gz file: tar zcvf tarball.tar.gz mydir/*

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.