Skip to Content
Linux in a Nutshell, 6th Edition
book

Linux in a Nutshell, 6th Edition

by Ellen Siever, Stephen Figgins, Robert Love, Arnold Robbins
September 2009
Beginner
942 pages
85h 34m
English
O'Reilly Media, Inc.
Content preview from Linux in a Nutshell, 6th Edition

Name

whereis

Synopsis

whereis [options] files

Locate the binary, source, and manual page files for specified commands/files. The supplied filenames are first stripped of leading pathname components and any (single) trailing extension of the form .ext (for example, .c). Prefixes of s. resulting from use of source code control are also dealt with. whereis then attempts to locate the desired program in a list of standard Linux directories (/bin, /etc, /usr/bin, /usr/local/bin/, etc.).

Options

-b

Search only for binaries.

-B directories

Change or otherwise limit the directories to search for binaries.

-f

Terminate the last directory list and signal the start of filenames. Required when the -B, -M, or -S option is used.

-m

Search only for manual sections.

-M directory

Change or otherwise limit the directories to search for manual sections.

-s

Search only for sources.

-S directory

Change or otherwise limit the directories to search for sources.

-u

Search for unusual entries--that is, files that do not have one entry of each requested type. Thus, the command whereis -m -u * asks for those files in the current directory that have no documentation.

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 *
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Unix in a Nutshell, 4th Edition

Unix in a Nutshell, 4th Edition

Arnold Robbins
Linux Under the Hood

Linux Under the Hood

Sander van Vugt
Linux Kernel in a Nutshell

Linux Kernel in a Nutshell

Greg Kroah-Hartman

Publisher Resources

ISBN: 9780596806088Errata Page