You have probably looked up the parameters for
tar more than you’ve changed socks. And what if the scenario from xkcd ever became real? Could you really run a valid tar command without googling first?
Here’s a few tricks to help you remember how to use tar if you want to extract files from an archive, either
That’s it! All you need is
tar -xf <filename>
Many guides will use -xvfz (or -xfzv or -xfvz or whatever), but -v and -z are not actually necessary.
-z is only used to tell tar it’s a .gz file, but for the last 15 years or so tar have been able to automatically detect this itself.
The other parameter,
-v, is not necessary either, but it can be quite useful as it simply means verbose (extended/detailed) output in the terminal window.
So you if you want to see the progress of the file operation, include -v as well, so the final command becomes:
tar -xvf <filename>
Remember it by saying out loud:
tar eXtract Verbose File <filename>
Or, as mentioned, simply use:
tar -xf <filename> (
tar eXtract File <filename>)