4 ms·
What's wrong with zip?
by stryk 11y ago
What's wrong with zip?
- mnw21cam 11y agoAbsolutely nothing. Just a little discordant to see grep et al being discussed in a project packaged as a zip. I suppose people might want to play with this in Windows, although to be honest if you have gone to the trouble to install grep et al, you will have no trouble with tar either.
- irishcoffee 11y agoI'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
- noxToken 11y agoYou're still missing the point. GitHub repos can be downloaded as a zip, because the zip file extension is easily compatible on all major operating systems.
- lazyant 11y agohttp://linux.die.net/man/1/unzip http://linux.die.net/man/1/unzip
- gnaritas 11y agoZip doesn't mean windows, lots of us Linux people don't like tar.
- FullyFunctional 11y agoLots of us Linux people don't like Zip, so? To point out the obvious, Zip compresses files individually and then bundles them. A .tar.{Z,gz,bz2,xz,...} files bundles the files and then compresses them. The latter is better for entropy reduction, the former is better for random access. It all depends on your objectives.
- gnaritas 11y agoOf course, but that's entirely beside the point; my comment was on the author assuming zip implied a windows user, it does not. Zip is ubiquitous on all OS's which is why github offers zip.
- CamperBob2 11y agoWhat always leaves a puzzled look on my face (as a Windows user) is .tar.gz. What does .tar do in the case where there's nothing but a single gzipped file being archived?
- FullyFunctional 11y agoPreserves the permission, user, group, time-stamps, and complete original name and path. Granted, there's a small overlap with what gzip also provides, but a tar file is as close to the original as you generally gets. Oh, and exotic: support for sparse files (if enabled).
- shabble 11y agohttp://brettcsmith.org/2007/dtrx/ http://brettcsmith.org/2007/dtrx/