Create and view interactive cheatsheets on the command-line
github.com
github.com
https://www.reddit.com/r/ProgrammerHumor/comments/1x0qwh/hav...
`tar` has a pretty simple calling syntax, probably simpler than most utilities. I encourage people to use the manpages instead of cute but wrong or misleading mnemonics.
Resizing an image with imagemagick's convert utility is extremely common, but invoking the binary with -? or bringing up the man page will get you way more information than you're actually looking for, whereas the cheatsheet[1] has exactly what you need right there.
[1]: https://github.com/cheat/cheatsheets/blob/master/convert
I clip and crop videos of games I play, and find it much quicker to do with ffmpeg, rather than use some big video editing software that will have way more features than I need.
Sick of constantly Googling, I made a tiny cheat sheet to keep around to copy-paste my most common incantation to centre crop video to 16:9 and resize to 720p. https://github.com/joshhunt/docs/blob/master/ffmpeg.md
I might consider adding a few examples to the ffmpeg cheat/cheatsheet and ditch mine :)
This. I have always complained to myself that man pages should have had this option.
That is what excited me about this. Maybe cli apps will see this example and try to document how to use it in this way. Infinitely more usable in my opinion.
If you don't remember the particular command, why not to look it up for the first time and then assign personalized alias, which is easy to remember?
Like with `tar` example and `zsh` you can even define suffix alias (`alias -s`), so you can just type `./your-file.tgz` and `zsh` will invoke `tar -xzf ./your-file.tgz` or whatever you prefer.
...that of course assumes I have an internet connection. Otherwise, fall back to man pages as well as my own directory of text files with reference info on commonly used commands - employing my own examples.
They're far apart but those moments when you want to cut a video, or set id3 tags, and you rely 100% on Google to find out the CLI args for you.
Much better to store them locally, or in a git repo shared by your devices, and look them up on the CLI.
Even better, I'd like them to be already stored in bash's ctrl+r "history" and be displayed with comments. That would be amazing, to just hit ctrl+r and start typing ffmpeg, regardless of how long since you ran that command.
Specific to man pages, it actually took me a while to learn how to read them in order to gain maximum benefit from them. Surely, the quality of manpages is not the same across all or even most applications...but i guess i've gotten used to manpages enough that between them, and my own text files, with a rare dive into something like http://cheat.sh/ or good ol' DDG search, seems to have me covered.
I've not been interested in pursing that cert. (my day job has been lots more pointy-haired boss type of work rather than sysadmin, dev, or devops, etc.). However, i do have a colleague who is pursuing this cert., plus your note about learning manpages (as one benefit), and other anecdotes that i've heard similar to yours...makes me think that maybe i should pursue this cert even if only for my own personal improvement. Thanks again for that interesting tidbit!
I did find it to be a good exercise in some things that I don't do often (and things like using man pages), and I also would say that I feel a bit more confident and validated walking around with the cert than I did before.
I also got a T-Shirt!
x - extract
c - create
z - zip (like, compress)
v - verbose
f - file
when I write the command I just say in my head what I want to do: Say I want tar xzvf:
tar extract zip verbose file
makes sense to me
I guess if you wanted you could make a new command that only prints the EXAMPLES section of a man page. It could turn out to be an improvement even since you get all the nice things that man provides like colours and consistent formatting for free.
$cheat cheatOn a serious note I don't think tools like these are much of a substitute for genuine knowledge. I figured it was more for quick reference. Like say you've forgotten whether source or destination comes first when using ln (source come first).