Tag Archives: mnemonic

Tar archive mnemonic

I’ve always failed at remembering how to create and extract tar archives. But hey, why not create a mnemonic!?

Creating a tar.gz file:

Create Zip File

tar czf newarchive.tar.gz /path/to/file


eXtract Zip File

tar xzf somearchive.tar.gz

You can of course add the v option to turn on the verbose mode. eg: 

tar xzfv somearchive.tar.gz

Or add a -C option to explicitly mention where you’d like the archive to extract to, like this: 

tar xzf somearchive.tar.gz -C ~/ws