whereis
{{lowercase|whereis}}
whereis is a command on Unix and Unix-like operating systems used to locate some special files of a command like the binary file, source and manual page files. The whereis utility was first included with 2BSD,{{cite web |url=https://dspinellis.github.io/unix-history-man/man1.html |title=Evolution of Unix section 1: User commands |website=dspinellis.github.io |date=2023 |access-date=10 October 2023}} dating back to 1979.{{cite web |url=https://www.tuhs.org/Archive/Documentation/TUHS/Mail_list/2022-April.txt |title=[TUHS] whereis command |website=tuhs.org |date=2022 |access-date=10 October 2023 |quote=I'm pretty sure we got it in early 79, so I clearly rewrote it at some point if the dates show later |author=Clement Cole }}
Syntax
The whereis
man page provides the following sample usage:
% # Find all files in /usr/bin which are not documented in /usr/man/man1 with source in /usr/src:
% cd /usr/bin
% whereis -u -M /usr/man/man1 -S /usr/src -f *
Analogs
The Unix type
command is similar, but it identifies aliases.
Modern versions of Microsoft Windows feature a similar command: where
.{{cite book
| last1 = Bhardwaj
| first1 = Pawan K.
| chapter = Locating Files with the Where Command
| title = How to Cheat at Windows System Administration Using Command Line Scripts
| year = 2006
| url = https://archive.org/details/isbn_9781597491051
| url-access = registration
| location = Rockland, Massachusetts
| publisher = Syngress
| publication-date = 2006
| page = [https://archive.org/details/isbn_9781597491051/page/207 207]
| isbn = 978-0-08-050826-9
| access-date = 2016-07-05
| quote = […] the Where command […] is equivalent to using the Search option in the Start menu.
}}
It's also similar to the where
utility in Multics.
See also
References
{{Reflist}}
External links
- [http://man7.org/linux/man-pages/man1/whereis.1.html man page of whereis command]
- [https://www.linuxteacher.com/whereis-command-in-linux-with-examples/ Command whereis – 10 practical examples] {{Webarchive|url=https://web.archive.org/web/20201027084509/https://www.linuxteacher.com/whereis-command-in-linux-with-examples/ |date=2020-10-27 }}
{{Unix commands}}
Category:Unix user management and support-related utilities
{{unix-stub}}