What you actually do when you untar something

What actually happens when you untar something when you're using Linux

If you are anything like me you have typed more than your fair share of commands into Linux without actually knowing what you are passing in as parameters.  Over time you begin to learn a couple of them, but you are still largely committing strings of text to memory.

One particularly potent example of this (for me) is the tar command.  I am frequently typing tar -xvzf myFiles.tar.gz and it works well, but I have no idea what the -xvzf was actually doing.  Until today when I bothered to find out and then blog about it!

So here are the commands and what they do;

  • x - extract (makes sense, this is used because there is no untar function.)
  • v - verbose (ahh good old verbose, the one everyone knows, this will output the files tar extracts.)
  • z - filter the output through gzip (this is done as I have the .gz extension on most of my files.)
  • f - use archive file or device F

For more information either run the man on tar or visit the man page for tar.


Recent posts View all

Ruby

Forcing a Rails database column to be not null

How you can force a table column to always have something in it with Rails

Writing Marketing

We've deleted an article's worth of unhelpful words

We've improved several pages across our site by removing words that add no value, and often detract from the article.