Re:Linux shell tips and tricks
by parennoob on Sunday November 24, 2013 @09:38AM
(#6789681)
Just use dtrx (do the right extraction) via `pip install dtrx`. Makes life much easier.
[ Parent
| on HN ]
GNU tar seems to have gained the a switch which will detect the right decompressor.
e.g.
tar axf linux.tar.gz
tar axf linux.tar.bz2
tar axf linux.tar.xz
will all work, assuming you have gzip, bzip2 and xz installed.
Re:Linux shell tips and tricks
by deathanatos on Monday November 25, 2013 @04:02AM
(#6793143)
Nowadays, `tar -xf foo.tar.gz` (at least in Linux) will auto-detect the gzipping and just do the right thing. I think it uses file extension, so I'd suspect it works for .bz2 and .xz too. (Not sure I'd use this for shell scripts, but for everyday command line it should work.)