

Cx: A bash function for comfortable extraction of *.tar/*.tar.gz/*.tar.bz2 - erikano
http://scratchingmyownitch.com/post/1326126873/cx-bash-function-comfortable-extraction-tar-tgz-tbz

======
warp
I use dtrx for this purpose (<http://brettcsmith.org/2007/dtrx/>).

~~~
MtL
It's worth mentioning that this is in the ubuntu (and debian?) repos. 'sudo
apt-get install dtrx'

------
imurray
Like many others, I've scratched this itch too:
<http://homepages.inf.ed.ac.uk/imurray2/code/hacks/untar> a simple bash
script. The comments in the source list debian/ubuntu packages to install to
support all formats.

It detects and extracts .7z .a .ace .arj .cab .cpio .deb .lha .pmd .rar .rpm
.tar{,.gz,.Z,.bz2,.xz} .tnef .zip (including .jar, .xpi etc) .zoo and
MIME/uuencoded mail attachments without ever splattering multiple files over
the current directory. Haven't compared to dtrx.

------
symkat
This is a petty cool idea.

Although you're _supposed_ to already package things like this, I think
everyone's been through the "oh damn, now there is 20 new files and
directories, which is what" before.

------
nailer
GNU tar already automatically detects compression types.

tar -xf file

Will happily extract tar, tgz, tbz and more.

~~~
tonfa
That's not the feature cx advertises.

~~~
nailer
You're right. I read the vague headline and assumed the obvious. This is a tar
bomb prevention tool and looks useful.

------
mikelward
cx is a common alias for chmod +x, so another name might be better.

~~~
kleiba
I've never heard of that - how do you know it's common?

~~~
mikelward
It's in UNIX Programming Environment by Kernighan and Pike, chapter 3.

~~~
yangyang
Also in Unix Power Tools by Powers, Peek, O'Reilly and Loukides, article 50.8
(3rd edition).

------
JonnieCache
This looks fantastic. I just need to add support for some more archive formats
(.rar primarily) and this will fill a need thats been bugging me for a while.

------
__david__
I've scratched that itch as well a few years ago: <http://porkrind.org/uz/uz>

------
noglorp
Egads, this is a problem that is still being solved?

I think the only reason for this is no one expected us to still be using
FUCKING UNIX at this point in history.

(Seriously... Open does not mean Good, will the OSS community ever 'start
fresh'?)

