apropos (Unix)

In computing, apropos is a command to search the man page files in Unix and Unix-like operating systems. apropos takes its name from the English word with the same spelling that means relevant. It is particularly useful when searching for commands without knowing their exact names.

Behavior

Often a wrapper for the man -k command, the apropos command is used to search the ”name” sections of all manual pages for the string/s (called keyword/s) specified. The output is a list of all manual pages containing the search term in their name or description. This is often useful if one knows the action that is desired, but does not remember the exact command or page name. apropos search is case insensitive.

A related command is whatis, which is useful for obtaining a brief description about a specific command whose exact name is already known.

Sample usage

The following example demonstrates the output of the apropos command:

$ apropos mount
free (1)             - Display amount of free and used memory in the system
mklost+found (8)     - create a lost+found directory on a mounted Linux second extended file system
mount (8)            - mount a file system
mountpoint (1)       - see if a directory is a mountpoint
ntfsmount (8)        - Read/Write userspace NTFS driver.
sleep (1)            - delay for a specified amount of time
switch_root (8)      - switch to another filesystem as the root of the mount tree.
umount (8)           - unmount file systems

In this example, apropos is used to search for the keyword "mount", and apropos returns the indicated man pages that include the term "mount".


The following example demonstrates the output of the apropos command with an regexp keyword (abc.n) and a regular keyword:

$ apropos abc.n xzless
XTestGrabControl (3) - XTest extension functions
xzless (1)           - view xz or lzma compressed (text) files

In this example, apropos is used to search for the keywords (with an regexp .) "abc.n" and xzless, and apropos returns the indicated man pages that include the keywords.


See also

This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.