Re:Know Your Tools – Terminal and Bash
by lfowles on Friday March 13, 2015 @02:07PM
(#9198728)
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!
[ Parent
| on HN ]
Re:Know Your Tools – Terminal and Bash
by chadzawistowski on Friday March 13, 2015 @02:32PM
(#9198943)
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...