4 ms·
I'm not usually one to post these, but I can't help it in this care: https://xkcd.com/1168/ https://xkcd.com/1168/
by irishcoffee 11y ago
I'm not usually one to post these, but I can't help it in this care:
https://xkcd.com/1168/ https://xkcd.com/1168/
- teekert 11y agotar zxvf! For tar.gz. Never, ever understood why the tar command can't just read the extension and determine the required long list of options needed for successful extraction. Whether I can remember tar xvjpf (for tar.bz2 files) depends on many things, not sure which. To be honest, I like it when I hit a .zip, I can just type "unzip x"... Nice xkcd :)
- Ianvdl 11y agoNewer versions of tar do automatically use the correct procedure based on the extension, just type tar xvf.
- teekert 11y agoWoah, I was stuck in the past! Thanx for the tips!
- andrewaylett 11y agoIt can. $ ls foo.tar.gz $ tar -xf foo.tar.gz $ ls foo.tar.gz my_file.md
- delluminatus 11y agoJust do "tar -xf" for all your file extracting needs. The other command-line parameters are pretty much only needed if you want to override the detected compression format.
- pdkl95 11y agoAll I ever need to remember: atool -x archive.{zip,jar,rar,cab,deb,rpm,tar,tar.{gz,Z,bz2,xz}} (list of supported formats is not complete) With a simple alias, it isn't even necessary to remember the -x alias xx="atool -x" This also protects you from badly made archives that explode hundreds of files into the current directory. All decompression is done in a temporary subdir, which is removed if there was only one file/dir at the top level. For xkcd, see atool's --explain or --simulate options that show you the generated tar/etc commands. http://www.nongnu.org/atool/ http://www.nongnu.org/atool/
- rcthompson 11y agoAtool already comes with appropriate aliases for all the common tasks: $ wajig list-files atool | grep bin/ /usr/bin/atool /usr/bin/arepack /usr/bin/aunpack /usr/bin/apack /usr/bin/als /usr/bin/acat /usr/bin/adiff
- takeda 11y agoIt does, I always extract files with: tar xf <file> (as in eXtract File) The xkcd answer could be: tar t I always see people using tar -zxvf <file>, I'm guessing they tried that and it worked, and they never needed to look in the manpage. I feel that
- yogiHacks 11y agolame@user:~/$ tar --help
- yogiHacks 11y agolame@user:~/$ tar --help