apropos - Unix, Linux Command


Advertisements

Previous Page
Next Page  
 

NAME

apropos - searches the manual page names and descriptions.

SYNOPSIS

apropos [-dalhvV] [-e|-w|-r] [-s list] [-m system[,...]] [-M path]
        [-L locale] [-C file] keyword ...

DESCRIPTION

Each manual page has a short description included with it. apropos searches these descriptions for instances of keyword.

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.

keyword can be a regular expression (by default; also see the -r option), or may contain wildcards (-w), or be instructed to match the only exact keyword (-e). Using these options, it may be necessary to quote the keyword, or escape ("\") the special characters to stop the shell from interpreting them.

The standard matching rules allow matches to be made against the page name and word boundaries in the description.

 

OPTIONS

TAG DESCRIPTION
-d, --debug Print debugging information.
-v, --verbose Print verbose warning messages.
-r, --regex Interpret each keyword as a regular expression. This is the default behavior. Each keyword will be matched against the page names and the descriptions indepenently. It can match any part of either. The match is not limited to word boundaries.
-w, --wildcard Interpret each keyword as a pattern containing shell-style wildcards. Each keyword will be matched against the page names and the descriptions independently. If --exact is also used, a match will only be found if an expanded keyword matches an entire description or page name. Otherwise the keyword is also allowed to match on word boundaries in the description.
-e, --exact Each keyword will be exactly matched against the page names and the descriptions.
-a, --and Only display items that match all the supplied keywords. The default is to display items that match any keyword.
-l, --long Do not trim output to the terminal width. Normally, output will be truncated to the terminal width to avoid ugly results from poorly-written NAME sections.
-s list, --sections list, --section list Search only the given manual sections. list is a colon- or comma-separated list of sections. If an entry in list is a simple section, for example "3", then the displayed list of descriptions will include pages in sections "3", "3perl", "3x", and so on; while if an entry in list has an extension, for example "3perl", then the list will only include pages in that exact part of the manual section.
-m system[,...], --systems=system[,...] If this system has access to other operating system's manual page descriptions, they can be searched using this option. For example, to search the manual page descriptions of an operating system called "NewOS", use the option -m NewOS. The system specified can be a combination of comma-delimited operating system names. (To include a search of the native operating system's whatis descriptions, include the system name man in the argument string. This option will override the $SYSTEM environment variable).
-M path, --manpath=path Specify an alternate set of colon-delimited manual page hierarchies to search. By default, apropos uses the $MANPATH environment variable, unless it is empty or unset, in which case it will determine an appropriate "manpath" based on your $PATH environment variable. This option overrides the contents of $MANPATH.
-L locale, --locale=locale apropos will normally determine your current locale by a call to the C function setlocale which interrogates various environment variables, possibly including $LC_MESSAGES and $LANG. To temporarily override the determined value, use this option to supply a locale string directly to apropos. Note that it will not take effect until the search for pages actually begins. Output such as the help message will always be displayed in the initially determined locale.
-C file, --config-file=file Use this user configuration file rather than the default of ~/.manpath.
-h, --help Print a help message and exit.
-V, --version Display version information.

EXAMPLES

Example-1:

 Display all manual entries with the word "pipe" in the page name or description.

#apropos pipe

output:
~$ apropos pipe
fifo (7) - first-in first-out special file, named pipe
funzip (1) - filter for extracting from a ZIP archive in a pipe
gst-launch-0.10 (1) - build and run a GStreamer pipeline
gst-launch-1.0 (1) - build and run a GStreamer pipeline
gst-visualise-0.10 (1) - Run a GStreamer pipeline to display an audio visuali...
gst-xmllaunch-0.10 (1) - build and run a GStreamer pipeline from an XML seria...
lesspipe (1) - "input preprocessor" for less.
mkfifo (1) - make FIFOs (named pipes)
mkfifo (3) - make a FIFO special file (a named pipe)
mkfifoat (3) - make a FIFO (named pipe) relative to a directory file ...
pclose (3) - pipe stream to or from a process
pipe (2) - create pipe
pipe (7) - overview of pipes and FIFOs
pipe2 (2) - create pipe
popen (3) - pipe stream to or from a process
splice (2) - splice data to/from a pipe
tee (2) - duplicating pipe content
vmsplice (2) - splice user pages into a pipe

Example-2:

To search multiple commands :

#apropos find grep

output:

bzegrep (1) - search possibly bzip2 compressed files for a regular expression
bzfgrep (1) - search possibly bzip2 compressed files for a regular expression
bzgrep (1) - search possibly bzip2 compressed files for a regular expression
chkdupexe (1) - find duplicate executables
Devel::InnerPackage (3pm) - find all the inner packages of a package
egrep (1) - print lines matching a pattern
-----------------------------------------------------
-----------------------------------------------------
-----------------------------------------------------
xzfgrep (1) - search compressed files for a regular expression
xzgrep (1) - search compressed files for a regular expression
zegrep (1) - search possibly compressed files for a regular expression
zfgrep (1) - search possibly compressed files for a regular expression
zgrep (1) - search possibly compressed files for a regular expression
zipgrep (1) - search files in a ZIP archive for lines matching a pattern

Example-3:

To find out all delete / removal related administrative commands:

#apropos -s8 -w "*delete*"
-w, --wildcard and -s, --selection list

output:
groupdel (8) - delete a group
ntfsundelete (8) - recover a deleted file from an NTFS volume.
userdel (8) - delete a user account and related files

Example-4:

 To Search command using regular expresions :

#apropos -r 'list file'
-r, --regex

output:
gvfs-ls (1) - List files
lsattr (1) - list file attributes on a Linux second extended file s


Example-5:

 To extract command exactly matched against the page names and the descriptions. :

#apropos -e 'grep'
-e, --exact

output:
grep (1)             - print lines matching a pattern


Example-6:

To serach command output without being trimmed to terminal width.

#apropos -l 'find'

output:

chkdupexe (1) - find duplicate executables
Devel::InnerPackage (3pm) - find all the inner packages of a package
ffs (3) - find first bit set in a word
ffsl (3) - find first bit set in a word
ffsll (3) - find first bit set in a word
File::MimeInfo::Applications (3pm) - Find programs to open a file by mimetype
find (1) - search for files in a directory hierarchy
find2perl (1) - translate find command lines to Perl code
findfs (8) - find a filesystem by label or UUID
findmnt (8) - find a filesystem
findsmb (1) - list info about machines that respond to SMB name queries on a subnet

 


Previous Page
Next Page