Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
man and --help not helpful? try tldr, cheat and eg!
#1
I spent a couple decades being "commandline challenged" in windows decided to fix that since migrating to linux. I have pretty good search engine tactics, as well do actually read the fine manual everywhere I can (man this, man that, oh man... and rarely run a command until I have a sense of what it is doing and how to best get it done (lots of --help use and flags/options reading).

But in the end I still end up with plenty of questions on how to format commands, coupled with severe memory issues, I end up with tons of notes and have a big messy cheat sheet I rely on.

While these tools do not cover everything, and there will be some redundancy between them, I have found all 3 to be valuable and often refer to all 3 for command examples when trying to sort things.

As tldr readme mentions, these tools are basically "simplified man pages focused on practical examples."

tldr: https://github.com/tldr-pages/tldr

cheat: https://github.com/cheat/cheat

eg: https://github.com/srsudar/eg

(also, from related projects, bro has proven useful a time or two although I read from website: http://bropages.org/browse to find commands as the tool provided errors often: https://github.com/hubsmoke/bro

Hope this helps!

edit to add: just noticed this other related project, dev has combined many sources for cheat sheets and can be run in Windows. (sources include tldr and cheat mentioned earlier). Very cool~
homepage: https://cheat.sh/
github project sources: https://github.com/chubin/cheat.sh#cheat-sheets-sources
Reply
#2
You can also use 'info'. Not many people now about it, but 'info'
belongs to the core of basically any system using the GNU tools.
I believe it was originally intended to replace the ancient man pages
and is slightly more interactive. Although it did not succeed in
replacing man pages, it is still a good source of information.
Its entries are both considerably longer and more detailled than
man pages, yet also easier to understand and easy to navigate.

As an example, try 'info tar'. The 'tar' command is known for
its command syntax that is hard to remember. But here in its info
page, down in the menu, the second entry is a nice tutorial.
If you scroll down, under the menu and the appendices, you can
find the "Detailled Node Listing", which shows you all pages of
the info page 'tar'. Here you can find such nice things as
"frequent operations", "create", "extract" and many more,
explaining in detail how to use the 'tar' command.
Reply
#3
(04-01-2019, 09:57 PM)leon.p Wrote: You can also use 'info'.

sweet! [c]info[/c] is like "man-splained" version of man Big Grin  (checked info inxi, what a great write up!)

I also came across a couple more links for similar projects-

https://explainshell.com/  &&  https://github.com/idank/explainshell
Quote:This site contains 29761 parsed manpages from sections 1 and 8 found in Ubuntu's manpage repository. A lot of heuristics were used to extract the arguments of each program, and there are errors here and there, especially in manpages that have a non-standard layout.

----

https://www.mankier.com

nice api can be setup in .bashrc
(found it here: https://www.tecmint.com/explain-shell-co...nux-shell/
Code:
# explain.sh begins
explain () {
 if [ "$#" -eq 0 ]; then
   while read  -p "Command: " cmd; do
     curl -Gs "https://www.mankier.com/api/explain/?cols="$(tput cols) --data-urlencode "q=$cmd"
   done
   echo "Bye!"
 elif [ "$#" -eq 1 ]; then
   curl -Gs "https://www.mankier.com/api/explain/?cols="$(tput cols) --data-urlencode "q=$1"
 else
   echo "Usage"
   echo "explain                  interactive mode."
   echo "explain 'cmd -o | ...'   one quoted command to explain it."
 fi
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)