For some reason I can never remember the tar and gzip command switches. Perhaps I’m just too used to double clicking to expand. Anyway as and aid memoir:

Create a tar gzipped archive parameters (c: create v: verbose z: zip f: following filename):

$ tar cvzf archive_name.tar.gz dirname/

And to extract it again (x: extract v: verbose f: filename follows z: gzipped archive):

$ tar xvfz archive_name.tar.gz

There’s a good overview here http://www.thegeekstuff.com/2010/04/unix-tar-command-examples/ including viewing the archive or extracting a single file.

Advertisements