Name

whereis [options] files — util-linux

Synopsis

/usr/bin stdin stdout - file -- opt --help --version

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 files

-M dirs… -f files

-S dirs… -f files

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

Get Linux Pocket Guide 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.