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

Examples:

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. Required fields are marked *

-->