55 ms·
Cx: A bash function for comfortable extraction of *.tar/*.tar.gz/*.tar.bz2
- symkat 16y agoThis 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.
- warp 16y agoI use dtrx for this purpose (http://brettcsmith.org/2007/dtrx/ http://brettcsmith.org/2007/dtrx/).
- MtL 16y agoIt's worth mentioning that this is in the ubuntu (and debian?) repos. 'sudo apt-get install dtrx'
- spcmnspff 16y agoThat looks really nice. I have something in my .$SHELLrc file that does something similar: the extract_archive() in http://github.com/Rydgel/archlinux/blob/master/.zshrc http://github.com/Rydgel/archlinux/blob/master/.zshrc but yours looks like it takes care of other things like archives within archives.
- deleted 16y ago[deleted]
- nailer 16y agoGNU tar already automatically detects compression types. tar -xf file Will happily extract tar, tgz, tbz and more.
- mikelward 16y agocx is a common alias for chmod +x, so another name might be better.
- kleiba 16y agoI've never heard of that - how do you know it's common?
- __david__ 16y agoI've scratched that itch as well a few years ago: http://porkrind.org/uz/uz http://porkrind.org/uz/uz
- JonnieCache 16y agoThis 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.
- imurray 16y agoLike many others, I've scratched this itch too: http://homepages.inf.ed.ac.uk/imurray2/code/hacks/untar 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.
- noglorp 16y agoEgads, 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'?)