It should be a crime to directly link XKCDs images without the corresponding page.
https://xkcd.com/1168/
No no it's this:
-
Decide you've gotta use tar.
-
man tar
-
Guess-and-check the flags until it seems to work.
-
Immediately forget the flags.
That was my case until I discovered that GNU tar has got a pretty decent online manual - it's way better written than the manpage. I rarely forget the options nowadays even though I dont' use
tar
that frequently.As much as I also do step 4, to be honest I don't see people use
man
anywhere near as much as they should. Whenever faced with the question "what are the arguments for doing xyz", I immediatelyman
it and just tell them - Practically everywhere you can execute a given command, you can also read full and comprehensive documentation, just look!
-
Those are straightforward; it's the remaining 900 options that are confusing. I always need to look up
--exclude
s and always get--directory
wrong, somehow.Why when explaining, giving examples of shell command are people so often providing shortened arguments. It makes it all seam like some random letters you have to remeber by heart. Instead of -x just write --extract. If in the end they endup using the tool so often they need to write it fast they'll check the shortcuts.
Does every Linux command have options as words instead of single letters?
Most commands will have expanded arguments started with 2 dashes that usually look like '--verbose-name-of-option', they're usually listed in the man page/documentation along with the abbreviated letter version
just now realizing that .tar files aren't compressed by default, and that that's the reason why it's always .tar.gz
The “-“ is often not necessary. I use it as a guide to see how long the person running tar has been using it.
Example:
tar -xf file.tar == tar xf file.tar
lists the files in the archive. So you don't need to extract the entire archive. Useful for huge archives.
dtrx is the way to do it. It's short for "do the right extraction", and it just works.
Also, all you have to remember for tar is "-xtract -zee -vucking -files" (extract the fucking files, but first letters only)
Yes, that's all very well, but you'll still need to find that image the next time you want to use it.
Saved this. Just like I did for tens of tar cheat sheets before. No, I won't remember it exists when I'll need to use tar. I will google it. I'll read that Stack Overflow page again. I will not enjoy it.
T_T
As a mnemonic I usually read the "f" as "fucking":
tar
,c
ompressf
uckingpics.tar.gz
with junk from./pics
tar
, ex
tractf
uckingpics.tar.gz
That's only for scripting though. Most of the time I simply right-click the directory or archive, and let Engrampa deal with it.