Hacker News new | ask | show | jobs
by lukabratos 4109 days ago
http://xkcd.com/1168/ ^_^
3 comments

I forget where I got this from, but this is how I remember it:

    tar -xzf # eXtract Ze Files!
EDIT: I missed chadzawistowski's similar comment below
I don't understand why you need options at all... If you point it at a file/directory it should automatically compress and if you point it at an archive it should automatically decompress. The options should be there for advanced tasks not 90% of the tasks you need the app for. It's really poor ui design.
After googling this three separate times I finally just aliased it to an 'untar' command. I'll remember this for when I'm ssh'ed somewhere!
Lately, all of my tar use has been `tar -xvf filename`. I don't remember it always being the case that those options would automatically gunzip/uncompress, but they do now!
The best mnemonic I've encountered for remembering those flags is visualizing Arnold Schwarzenegger yelling them: "eXtract Ze File!!!"
Hm, what OS? They didn't in the past. You needed to use 'tar -zxvf' for gunzip and 'tar -jxvf' for bzip2 IIRC. I still use it today to wrap files and move them on my server. On the server I use 'lzma' as default compression for archiving files (sql schemas, conf files, etc.)
Primarily Ubuntu, I'm not sure if this worked on my laptop when I was using Arch a couple years ago... I'd estimate the behavior has been around since 2008-2009.

I've found the option[1], but it's not in my alias list.

Edit: Changelog says Version 1.20 (2008-04-14) introduced the --auto-compress option

[1]: http://www.gnu.org/software/tar/manual/html_node/gzip.html#a...

haha exactly! :)