Man: How To More Effectively Make Use Of Man Pages

preview_player
Показать описание
Man pages are one of those things on Linux that you don't really think about, they're around when you need them but besides that you don't really bother seeing what can be done with them. Today I'm going to take a look at an article that discusses some methods to potentially use man pages more effectively, whether they do or not will be up to how you think about the ideas.

💖 Subscribe and ding the bell for more videos!
👍 Leave a like if you got something out of this video!
✍ Comment some video feedback or what you want to see next time!

==========Resources==========
🖊️ Article:

==========Support The Channel==========
Patreon:

Paypal:

BTC Wallet Address:
1Aokiv3pFQXUEmh2LbzZQAwxMvq6bpT2UN

ETH Wallet Address:
0x80451867c86bdf08c3888d407c1e3fcb6add61ed

LBC Wallet Address:
bLRN9fm17sCexKfgbYqmMj5xskZF2ogpEh

==========My Links==========
📚 LBRY Referral:

🎥 LBRY:

🎤 Discord:

✉️ Telegram:

🐦 Twitter:

🌐 Mastodon:

🖥️ GitHub:

==========Credits==========
🎵 Opening music
Creative Commons — Attribution 3.0 Unported — CC BY 3.0

🎵 Ending music
Рекомендации по теме
Комментарии
Автор

This is the most useful script I've ever written, it's just one line of code:

man $(apropos --long . | dmenu -i -l 30 | awk '{print $2, $1}' | tr -d '()')

It basically gives you a dmenu that lets you search through all the names and descriptions in real time (remember to install dmenu first). You can basically open it and give it vague terms for what you want, narrowing down on what you need. For those new to dmenu, separating what you write with spaces means adding filters. For example, typing "network config" will show you all the results that have both "network" and "config" in their name and/or description.

It can also open specific "sections" based on what's in parenthesis next to the manual name. The most important one to know is that the "p" denotes the POSIX version of the manual. I often times find the POSIX manuals to be much more useful because they describe a lot more about the program, and the information they provide is more standardised since it comes from one source.

Keep in mind that newly installed programs with man pages tend not to appear right away because the man database hasn't been updated yet (though you can still just open the manual manually from the terminal, or if you know the exact name of the manual you can just type it into dmenu and it will open it, do keep in mind that dmenu will select whatever result is highlighted so if something is matched press SHIFT+ENTER to bypass that). Depending on the system, it may be updated with a cron job, during boot, etc. but if you want to update it manually, run:
sudo mandb

To understand what the numbers in parenthesis mean, read the initial part of the man page for "man-pages". And to get more on sections, type "intro" into this script. I wish I knew these things when I was starting out, instead I found it by just randomly typing "intro" into my own script. To this day I don't see anyone teaching how to properly read the fecking manual.

alexanderchaplinbraz
Автор

The grep -A option for extra lines after the found term, and the less +/ option for add command and search are great tips. Another great Linux tutorial video.

example
Автор

Good GOLLY have Brodie’s videos improved.

ultradude
Автор

Regarding "info" pages, I have a little historical "info". Info pages were actually created by the Gnu project. I don't know exactly when or by whom... It's possible such a thing existed prior to the Gnu project, but I don't think so. RMS championed use if info pages because ( and this was before the web ... maybe before gopher ) the parts of the manual were linked. You didn't have to open a huge manpage and search, which RMS saw as a shortcoming. Because of this, all the Gnu tools had info pages instead of industry standard manages, and they were usually very big, and split up into a bunch of small chunks.

There are downsides, of course. I mean, they've been around since the 80s or early 90s. If they were fabulous you would've heard of them ;-)

Think about how you use manages. If you know what you're looking for, you can search for inside that manpage. Otherwise, you might scan the document visually. If you've never used the command before, you pretty much get everything you need by looking at the top, looking at the bottom, and maybe stopping in the middle if something catches your eye. With info pages, that doesn't work so well. You have to navigate through links ( sometimes 2 - 3 layers ) to access the desired stuff. Many times one topic in an info page would be split up into multiple "bite-sized" documents. This makes it harder to search and scan, of course. But it also meant your documentation was split between two tools that worked differently. This added a couple of things to think about that you never even had to be aware of before. I /really/ want to search in one tool as much as possible. Apparently that was the consensus view.

I started with Slackware in '98, and by the time I switched to Debian about 3 years later, the Debian developers were working on a project to ensure every official package had a manpage with it. Sometimes they would use --help output, and sometimes they'd use simplified info pages. They still distributed the info pages because it was the official documentation for the Gnu tools, and they were the best (most complete) docs for those tools... But they were still a pain ;-) ( Info definitely did *not* originally search man pages for you). If I need to navigate info pages these days, I use the pinfo tool. It works more like a text-based web browser, and search both databases.

wadecurry
Автор

So did you learn anything useful from this video or did you already know about all of those tips, let me know down below.

BrodieRobertson
Автор

Hey Brodie,
I am enjoying your videos so far, as someone that's new to Linux, they are very helpful! So thank you!
Now, I don't mean to be mean, but I feel like you make better content when you give you own tips and advice instead of following someone else's article, manpage etc. Especially since you admit some of the things you end up saying aren't really that helpful.
I know you must be busy and this way its easier but you don't have to post every day if that hinders your creativity!
Anyways, don't take my word for it, maybe it's just your style! Good luck and keep up the good work!

palmilhas
Автор

2-nd. I borrow from Derek Teylor(Distrotube) the idea to use nvim as man pager -i.e. man is opened in nvim and you can search copy ... all vim capabilities
3-d. to Mr. Rich B.O.B on pdf This approach is explained on Luke Smith's channel. He on the fly make pdf and open in zathura for reading. All scripts are on his channel.
P/S. Brodie thanks for video

mikesa
Автор

export MANPAGER='vim -c "set ft=man" -'
export MANPAGER='nvim -c "set ft=man" -'

faerryn
Автор

An useless info: man pages are written for groff typesetting tool, so technically you could very easily make a PDF of a man page.