Name

whereis — stdin  stdout  - file  -- opt  --help  --version

Synopsis

whereis [options] files

The whereis command attempts to locate the given files by searching a hardcoded list of directories. It can find executables, documentation, and source code. whereis is somewhat quirky because its list of directories might not include the ones you need.

Useful options

-b

-m

-s

List only executables (-b), manpages (-m), or source code files (-s).

-B dirs... -f

-M dirs... -f

-S dirs... -f

Search for executables (-B), manpages (-M), or source code files (-S) only in the given directories. You must follow the directory list with the -f option before listing the files you seek.

Get Linux Pocket Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.