WHICHMAN(1)
π WHICHMAN(1) π
okay so bestie, welcome to the whichman manual page, from the General Commands Manual section, and it's giving "which but make it generous" π
β¨ NAME β¨
whichman β shows you where a man page lives, using a fault tolerant approximate matching algorithm πΈ
π SYNOPSIS π
whichman [-#ehIp][-t#] man-page-name
π¦ DESCRIPTION π¦
So whichman is like a which-alike search command, but for man pages π It goes digging through the MANPATH environment variable.
If that variable isn't set at all? No stress, it just uses this default and moves on:
/usr/share/man:/usr/man:/usr/X11R6/man:/usr/local/share/man:/usr/local/man
Now here's the tea: unlike which, this program does not stop at the first match π«Ά It literally does not. And honestly the name should probably have been something like whereman, because it's not a "which" at all, bestie, it's a whole different vibe π whichman shows you all the man pages that match, and it lets you figure out which sections those pages belong to.
Also β and this is lowkey iconic β whichman can handle international manpage path names for different languages. Man pages in different languages may be stored in:
.../man/<country_code>/man[1-9]/...
By default, whichman does fault tolerant approximate string matching β¨ With a default tolerance level of:
(strlen(searchpattern) - number of wildcards)/6 + 1
no cap, that's the actual formula π
π OPTIONS π
-hβ prints a little help/usage information. your girl just wants to be helpful π₯Ί-Iβ do a case sensitive search (the default is case in-sensitive, so this is the spicy one π₯)-eβ use exact matching when searching for a given man page, and the wildcards*and?get disabled π-pβ prints the actual tolerance level right in front of the man page name π-#or-t#β sets the fault tolerance level to #. The fault tolerance level is an integer # in the range 0-255. It says the maximum number of errors allowed while finding the approximate match. A tolerance_level of zero allows exact matches only β but it does NOT disable the wildcards*and?β οΈ (important distinction, bestie, don't get it twisted)
The search key may contain the wildcards * and ? (but like, peep the -e option first π):
'*'β any arbitrary number of character'?'β one character
The last argument to whichman is not parsed for options, because the program needs at least one man-page-name argument. Which means:
whichman -x
will not complain about a wrong option β it will just search for the man page named -x π periodt.
π EXAMPLE π
whichman print
This will e.g. find the man-pages:
/usr/share/man/man1/printf.1.gz
/usr/share/man/man3/printf.3.gz
/usr/share/man/man3/rint.3.gz
look at that, three results, she ate π
π BUGS π
The wildcards '?' and '*' can not be escaped. These characters function always as wildcards. This is however not a big problem, since there is hardly any man page that has these characters in its name π so like... it's fine, honestly.
π AUTHOR π
Guido Socher (guido@linuxfocus.org)
π SEE ALSO π
and that's the whole page, bestie!! this one came out of the Search utilities corner of the world, dated April 1998 β yeah, she's vintage, she's a classic, and she still slays πβ¨π
π¦ where this page comes from
- debian bookworm: whichman 2.4-10 Β· GPL
- debian trixie: whichman 2.4-10 Β· GPL
- ubuntu jammy: whichman 2.4-10 Β· GPL
- ubuntu noble: whichman 2.4-10 Β· GPL
- ubuntu questing: whichman 2.4-10
- ubuntu resolute: whichman 2.4-10build1 Β· GPL
- ubuntu stonking: whichman 2.4-10build1 Β· GPL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms