Hacker News new | ask | show | jobs
by jobu 3891 days ago
There is some merit to "doing one thing well", but taken to the extreme it can be horrible in a different way:

tar cvf - FILE-LIST | gzip -c > FILE.tar.gz

(https://xkcd.com/1168/)

3 comments

Rob in that comic clearly hasn't used Unix long enough to know about the Arnold mnemonic[1].

[1] http://i.imgur.com/Vf0An8J.png

What kind of tar are you both using that doesn't detect the compression type? tar -xf FILE is fine.
I just use GNU long options now, e.g.:

$ tar --extract --verbose --gzip < foo.tar.gz

$ tar --create --gzip --file sql.tar sql/

After switching to this style I never have problems coming up with the correct command. It's a lot easier to read in shell scripts too.

Just alias it.