doesn't look like it. tldr.sh seems to pull from the web, while this cheat project looks to be more of a similar too to collect knowledge you build yourself over time.
This is what I've been looking for. I might have come across it before and ignored it, but I really need this.
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.
I've been using this tool for a while. It's great for when you're familiar with a command but would prefer a list of common examples instead of a detailed man page for whatever reason.
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.
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.
I want to echo what you are saying a little bit. I have never learned something from a man page. Maybe it is because they provide full documentation but that is very rarely actually useful when using commands.
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.
Oh no, here it comes, the next generation of superduper admins. Fast, efficient, no experience nor education.
"Erm.. Boss, we have leaked our database into the wild, because .. erm .. yeah .. I mouse-pasted first search result and it worked :thumbsup: .. it wasn't me .. just an unfortunate accident .. blame the software!"
I heard some of those new admins even use man pages or personal notes. Curse those amateurs, back in my day we kept all of POSIX in our heads and we liked it!
On 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).
I've written a similar tool — with the additional feature of syntax highlighting of the output. (And a shorter command name, which might actually matter for a tool like this!)
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.
Funny, i actually created my own alias which points to http://cheat.sh/
...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.
I needed the tool to install the tool. It ships as a `.gz` file. The standard `tar zxvf cheat-linux-amd64.gz` doesn't work. Tried `7z x cheat-linux-amd64.gz` which works.
`tar -xfj foo.tar.bz2` would extract the file `foo.tar.bz2` from inside the archive `j`. IOW, it's providing `j` as the argument to the option `-f` that's used to specify the archive file. It should rather be `-xjf`. Also, case matters, `-J` is for .xz files, not .bz2.
`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.
So, we now have tldr, and navi, and mnemonic, and cheat, and maybe some more similar tools. But why don't we add these examples to the respective man pages? There's clearly a need for them.
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.
This seems a nifty utility...but I've slowly migrated to depending on manpages, my own directory of text files, and with an alias to http://cheat.sh/ (while online, that is). Looking at this tool, mnemonic, navi, etc., i almost prefer navi and mnemonic over cheatsheets, but obviously that is only personal taste, and with no offense to the makers of any of these utilities.
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 learned more about how to use man pages in the 3 (4?) hours of LFCS exam than I did in nearly 10 years of using unix/linux every day. It's amazing what being forced to work without a web browser to hand can do.
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!
Since you may be interested I would add that it didn't take much preparation after having worked as a sysadmin/dev/linux user for nearly 10 years, and my employer paid for it so there wasn't really investment from me. There are some targeted questions (there was a Docker question for example) that might throw you if you don't typically use the tech, but also a lot of general linux usage (grep, find, stdin/out/err manipulation, etc) so that even if you have to skip something (I didn't finish completely) you still stand a good chance of passing.
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.
It's funny that when I saw this headline I thought, "That would be great for tar!" Admittedly I do have the ability to disable the bomb and can both create and execute archives (gzipped or not!) without a cheat sheet. But for pretty much anything else, I never have the confidence to do it without looking at the manpage, or my own cheat sheet.
30 comments
[ 3.5 ms ] story [ 69.3 ms ] threadThey'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.
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.
On 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).
https://github.com/codesections/mnemonic
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.
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.
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.
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