Questions tagged [apropos]

Displays a list of all topics in the man pages that are related to the subject of a query.

The apropos command lists the man pages in which the occurrence of at least one of its arguments can be found in the NAME secion or the SYNOPSIS section.

On most systems apropos is implemented by:

alias apropos="man -k"

By default each argument is searched independently, unless -a is given. For example:

$ apropos ulimit -a get
ulimit (3)           - get and set user limits
ulimit (3p)          - get and set process limits

$ apropos ulimit get
ulimit (1p)          - set or report file size limit
getmsg (2)           - unimplemented system calls
ulimit (3)           - get and set user limits
ulimit (3p)          - get and set process limits
ulimit.h (0p)        - ulimit commands
zmq_ctx_get (3)      - get context options
zmq_getsockopt (3)   - get 0MQ socket options
zmq_msg_get (3)      - get message property
zmq_msg_gets (3)     - get message metadata property
zmq_strerror (3)     - get 0MQ error message string
zshcompwid (1)       - zsh completion widgets
# ...
# a very, very, long list because of "get"

Unless -e is given, each argument is treated as a regular expressions. For example:

$ apropos 'u?limit'
setrlimit (2)        - get/set resource limits
setrlimit (3p)       - control maximum resource consumption
timeout (1)          - run a command with a time limit
ugetrlimit (2)       - get/set resource limits
ulimit (1p)          - set or report file size limit
getmsg (2)           - unimplemented system calls
ulimit (3)           - get and set user limits
ulimit (3p)          - get and set process limits
ulimit.h (0p)        - ulimit commands
14 questions
4
votes
1 answer

man -k returns no results

I was following a tutorial and thought why not...let me brush up on the man command...and low and behold I learned a few things after years working with different flavours of Unix. On my RHEL7 however, trying out the new trick to be able to look-up…
Beezer
  • 149
  • 1
  • 4
3
votes
1 answer

Why does `makewhatis` choke on symbolically linked directories, and how can I fix/avoid it?

Example (from macOS 11.7; also shows up on macOS 12.6.1; these are the only systems I have available to test) $ pushd "$(mktemp -d /tmp/makewhatis-XXXXXXX)" $ mkdir man $ ln -s man sman $ mkdir man/man1 $ cp /usr/share/man/man1/true.1 man/man1/ $…
D. Ben Knoble
  • 484
  • 3
  • 8
3
votes
1 answer

How to get apropos to show only executable programs/shell commands?

Most of the times when I use apropos I don't care about system calls, library calls etc — I'm just trying to find a command I forgot the name of. Is there a way to trim down the output of apropos to show only executables and commands (section 1 of…
zool
  • 267
  • 2
  • 13
3
votes
1 answer

Why does apropos and man -k omit or miss valid results?

For example, if I enter the following command: $ man -k compare The diff command is missing from the results, however the test command is not. I get the same results using apropos as expected. $ whereis diff diff: /usr/bin/diff…
metabind
  • 33
  • 4
3
votes
1 answer

How can apropos find emacs?

Funny thing is, after 25 years of hearing what apropos can do -- 25 years ago I didn't understand what it can do -- yesterday I just found that it is for making suggestions for what tools or command you can use. Such as: apropos editor and it will…
nonopolarity
  • 2,969
  • 6
  • 31
  • 41
2
votes
1 answer

Full-text search for manpages and get the list of the name and descriptions from a console like apropos(1)

Is there any way to do a full-text search for manpages and get the list of the name and descriptions of relevant manpages from a console like apropos(1)? You can full-text search the content of manpages with man -K. But there are three…
SATO Yusuke
  • 123
  • 3
2
votes
3 answers

Why man -k or Apropos cannot find some pages while man -a can?

On my Pop!_OS 20.04 LTS system, if I use man -aw printf it will return: /usr/share/fish/man/man1/printf.1 /usr/share/man/man1/printf.1.gz /usr/share/man/man3/printf.3.gz But if I use man -k printf or man -f printf or apropos printf it will only…
1
vote
0 answers

apropos does not find cmp

Why can't apropos find cmp? I clearly see both search words on cmp man page. I've tried to run sudo mandb -c just in case with no apprarent changes. I've tried web search, read Why man -k or Apropos cannot find some pages while man -a can? however…
Martian2020
  • 1,039
  • 7
  • 20
1
vote
1 answer

How can I search manpages of a certain section range?

To give context, I want to do something like an this: alias posix='man ?p', so that I could later type-in posix time and display time(1p), time(3p), etc.. Is this supported by man or will I have to hack something together with apropos?
Moth
  • 317
  • 1
  • 2
  • 6
1
vote
1 answer

How to make apropos read MANPATH

I am an unprivileged user on a system, so I have installed some software in my home directory. In addition to adding ~/.local/usr/bin to my PATH, I've added ~/.local/usr/share/man to my MANPATH so I can query the man pages for those packages. For…
tomocafe
  • 121
  • 3
1
vote
1 answer

Commands suggested by apropos are not working

I was trying to look for encryption commands with apropos: apropos encrypt A lot of them don't work, for example: gpgsm, setkey, passwd2des etc. When I type them I just get: bash: command_name: command not found Any idea on how to fix this?
Tom
  • 11
  • 1
0
votes
1 answer

What does the number after each command that listed by the apropos command mean? (1-8, pm, ssl, etc)

I was trying to complete an article on apropos command. When I run the apropos command, it lists out something like this: fahim@Fahim:~$ apropos delete argz_delete (3) - functions to handle an argz list crlutil (1) - List, generate,…
Fahim
  • 101
  • 1
0
votes
1 answer

man -k / apropos "nothing appropriate." for "compilation" word from man objdump description

I've read couple of posts (man -k returns no results) and first run mandb (nothing was updated), then mandb -c (7438 manual pages were added.), still $ apropos compilation compilation: nothing appropriate. But $ MANWIDTH=120 man objdump | grep…
Marisha
  • 323
  • 2
  • 13
0
votes
1 answer

A command's output and its symbolic link's output do not match

I am using RASPBIAN on my raspberry pi. I find out that the command "apropos" is a symbolic link of the command "wahtis". However, the output of those commands do not match when used with the same arguments: $ whatis delete delete: nothing…