Hacker News new | ask | show | jobs
by soneil 1492 days ago
You’d be amazed how many people I’ve found that do ‘tar xzf filename’ without knowing what xzf is doing.
3 comments

I'll admit to being one of those people. My brain still spells it out as eXtract Ze Files every time :-P
You're 2/3 correct:

x - extract

z - gzip format

f - file (must be last so it parses the filename arg correctly

I also add "vv" in the middle so it lists every file as it goes, so I can see it work instead of just waiting with no output.

It's not often I actually unzip stuff on the command line these days, but saying "extract ze files" in a terrible French accent in my head when I do is a highlight.
Passing "z" is pretty pointless for extractions.
I think it was required until about 2010 or so for GNU tar. (I still use it from habit.)

There was a problem about integrating support for different compression applications, with each one needing to get a new letter in the tar command!

Yup, I remember when you had to pass `z` if it was gzip, and I remember my surprise when I missed it once and it still worked (apparently about 5 years after it was no longer needed!)
Won't this fail when the file is not gzipped but, for example, zstd compressed?
It doesn't assume gzip, it detects the compression format.
I don't tend to amaze myself.