apropos
keyword
Search the whatis database for keyword. Provides terse, but thorough, documentation. Good place to start looking if you're clueless. You must run makewhatis before using keyword.
Example: To retrieve information on the various files and executables dealing with passwords, use
apropos passwd
info
options keyword
Info is a hypertext reader that searches and displays on-line documentation about the specified keyword.
Example: To look up information on the cd command, use
info cd
Example: To look up information on the grep command and store it in output file grep.doc, use
info -o grep.doc grep
--directory DIRECTORY-PATH, -d DIRECTORY-PATH | Look for info files in the specified directories. |
--file FILENAME, -f FILENAME | Search the specified filename for information about keyword. |
--node NODENAME, -n NODENAME | Force display of the specified info node. |
--output FILENAME, -o FILENAME | Direct all output to FILENAME, rather than standard output. |
--subnodes | Recursively output the nodes appearing in the menu of each node being output. |
--help, -h | Output a description of the available options for info. |
--version | Display the version information. |
locate
[-d path] [--database=path][--version][--help] pattern
Search the locate database for pattern. This command serves some of the same purposes as find, but it is quicker and not as thorough.
Note that in order for this command to work, the updatedb command must first be run. If you get in the habit of using locate, you probably ought to put a line in your crontab to run updatedb every night; otherwise, your information will get out of date quickly.
Example: To get locate to search its database for HOWTO files pertaining to XFree86, use
locate HOWTO | grep XFree86
If the file you're after was created since the last time updatedb was run, locate won't find it. Use the find command instead. |
-dpath, --database=path | Search the specified path instead of the default path. |
--version | Display the version number. |
--help | Display help info. |
makewhatis
options
Create the whatis database, an on-line database of commands used by the whatis command. Generally, makewhatis needs to be run only once.
Example: To update the whatis database after you've installed a new batch of man pages, use
makewhatis -w
-u | Update database with new man pages. |
-v | Operate verbosely. |
-w | Use manpath obtained from man --path. |
man
[-acdfhkKtwW] [-m system] [-p string] [-C config_file] [-M path] [-P pager] [-S section_list] [section] name
Format and display on-line manual (man) pages. Man pages are prepared documents associated with a particular command. They describe the command syntax, the usage, the associated files, and occasionally provide usage examples. The following environment variables apply:
MANPATH | Specify the path to be searched for man pages. |
MANROFFSEQ | Determine the set of preprocessors run before nroff or troff. |
MANSECT | Specify which sections of the manual to search (if set at all). |
MANWIDTH | Specify the width at which man pages are displayed. |
MANPAGER | Specify the paging program used to output man pages. |
LANG | Specify the subdirectory where man first looks for entries. |
Example: To search for the manual page for the ls command, use
man ls
Example: To search for all manual pages (not just the first one) on the mke2fs command and display using the less pager, use
man -a -P less mke2fs
-Cconfig_file | Specify the configuration file used by man. The default is /etc/man.conf. |
-Mpath | Specify the list of directories to search for man pages. |
-Ppager | Specify which program is used to present the output to the user. The default is /usr/bin/ less-is. |
-Ssection_list | Specify a list of man sections to search (list delimited by colons). |
-a | Force man to display all man pages matching the name argument, not just the first. |
-c | Force man to reformat the source page, regardless of whether an up-to-date cat page exists. |
-d | Print debugging information, instead of actual man pages. |
-D | Display and print debugging information. |
-f | Force man to behave as if it were the whatis program. |
-h | Print a succinct help message. |
-k | Force man to behave as if it were the apropos program. |
-K | Force man to search for the specified string in all man pages (painfully slowly). |
-msystem | Specify an alternate set of man pages to search based on the system name given. |
-pstring | String is a sequence of preprocessors to be run before nroff or troff. |
-t | Use /usr/bin/groff -Tps-mandoc to format the man page. |
-w or --path | Instead of the man page, print the path of the man page that would be displayed. |
-W | Same as -w option, but only prints one file name per line. |
updatedb
[options]
Update the file database used by locate.
Example: To update the database used by locate, enter
updatedb
If you use locate, you should run this command nightly via cron. |
--localpaths='path1 path2...' | Nonnetwork directories to put in the database. |
--netpaths='path1 path2...' | Network (NFS, AFS, RFS, etc.) directories to put in the database. Default is none. |
--prunepaths='path1 path2...' | Use this option to specify a list of directories to exclude from the updateb database. Default value is /tmp, /usr/tmp, /var/tmp, /afs. |
--output=dbfile | The database file to build. Default is system-dependent, but typically the following is used: /usr/local/var/locatedb. |
--netuser=user | The user to search network directories as, using su(1). Default is daemon. |
--old-format | Create the database in the old format, instead of the new one. |
--version | Print the version number of updatedb and exit. |
--help | Print a summary of the options to updatedb and exit. |
whatis
keyword
Search the whatis database for keyword. The whatis database contains short descriptions of system commands. Note that for the command to be usable, you must first run the /usr/sbin/makewhatis command.
Example: To get a brief description of the cron command, use
whatis cron
whereis
[ -bmsu ] [ -BMS directory -f ] filename
Locate source files and applicable manual sections for the specified files.
Example: To search for source files and manual selections for the /etc/hosts file, use
whereis /etc/hosts
-b | Search for binary files only. |
-m | Search the manual pages only. |
-s | Search for source files only. |
-u | Search for unusual entries. An unusual entry is a file in the current directory that has no binary, man page, or source file associated with it. |
-B | Specify where to look for binaries. |
-M | Specify where to look for man pages. |
-S | Specify where to look for source files. |
-f | Used as a delimiter on the command line. Indicates that the directory list has ended and the file list is about to begin. |