4 ms·
This. https://xkcd.com/1168/ https://xkcd.com/1168/
by jehna1 11y ago
This.
https://xkcd.com/1168/ https://xkcd.com/1168/
- chrismorgan 11y agoI never got this. I memorised basic usage of tar very quickly and have never had any issues with it since; and even if you didn’t know how to use `tar`, surely `tar --help` would be worth a go? (It’d be the first thing I’d use for an unknown program.)
- hk__2 11y agoTar options are actually very easy once you take the time to understand them. Want to create an archive? use `-c`. Want to extract? It’s `-x`. From that you know you can use `tar -cf foo.tar foo` (`-f` lets you pass the archive name) and `tar -xf foo.tar`. Want to be verbose? Add `-v`. Want to use gzip compression? Add `-z`. There are a bunch of other options to do more, but just with that you can already understand 99% of what tar is used for.
- coldtea 11y ago>Tar options are actually very easy once you take the time to understand them. That's not the experience of many people. Or maybe, "taking the time to understand them" is not how they want to spend their time, and the mnemonics are bad because the use is not that frequent anyway.
- tazjin 11y agoBut the time we're talking about to understand this is less than 5 minutes. Those same people spend more time joking about how complex the options are and linking that xkcd anyways.
- coldtea 11y agoLet me rephrase. There's nothing much to "understand". This is not a logical puzzle or a physics lecture. It's an arbitrary set of command line flags and argument order. So what's meant by "understanding" it, is basically "memorize". Sure, if one devoted some time, they could memorize it. Like people can learn the PI to the nth digit. But first, it's not just tar they use -- it's tens of other commands too. Second, a lot of them have clashing flag order or slightly different names for the same arguments. Third, most don't use them that frequently to make it worth it to sit and memorize it. Besides the infrequence of use means that simple memorizing once wont work, as they'll forget them without sitting down again later to refresh their memory. We can memorize complex vim commands because we use them everyday. Commands that we need once a month or once every 3 months, not so much. It would be better for all if tar just did the obvious and intuitive thing.
- marcosdumay 11y ago> It would be better for all if tar just did the obvious and intuitive thing. And what is that obvious and intuitive thing? Are you complaining about the need for a "-f" flag? If so, I'll agree, tar could take files the same way cat does. Tar's showing its age here, and would get a better interface without it. But all the other flags are there for a reason, are the obvious mnemonic choices, and are the same ones used on other similar commands.
- Klathmon 11y agoI saw something in a comment a few months ago that made it so i'll never forget this again. tar eXtract Ze File tar Compress Ze File
- npizzolato 11y agohttp://i.imgur.com/Vf0An8J.png http://i.imgur.com/Vf0An8J.png :)
- marklgr 11y agoFor some reason, I can't remember for my life how to use cpio, which I find worse than tar even though it has less options. I always mix up input/output mode, and I never remember how passthru mode works exactly.