
510
|
Chapter 3: Linux Commands
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
-M directory
Change or otherwise limit the directories to search for manual
sections.
-S directory
Change or otherwise limit the directories to search for sources.
Example
Find all files in /usr/bin that are not documented in /usr/share/man/
man1 but that have source in /usr/src:
$ cd /usr/bin
$ whereis -u -M /usr/share/man/man1 -S /usr/src -f *
which
which [options] [--] [commands]
List the full pathnames of the files that would be executed if the
named commands had been run. which searches the user’s $PATH
environment variable.
Options
-a, --all
Print all matches, not just the first.
-i, --read-alias
Read aliases from standard input and write matches to stan-
dard output. Useful for using an alias for which.
--read-functions
Read shell functions from standard input and report matches
to standard output. Useful for also using a shell function for
which itself.
--skip-alias
Ignore --read-alias if present. Useful for finding normal bina-
ries while using --read-alias in an alias for which.
--skip-dot
Skip directories that start with a dot.
--skip-functions
Ignore --read-functions if present. Useful when searching for
normal binaries while using --read-functions in an alias or
function for which.
--skip-tilde
Skip directories that start with a tilde (~) and executables in
$HOME. ...