OSDN Git Service

util-linux 2.38: 翻訳予約。
[linuxjm/jm.git] / manual / util-linux / original / man1 / whereis.1
1 '\" t
2 .\"     Title: whereis
3 .\"    Author: [see the "AUTHOR(S)" section]
4 .\" Generator: Asciidoctor 2.0.15
5 .\"      Date: 2022-02-17
6 .\"    Manual: User Commands
7 .\"    Source: util-linux 2.38
8 .\"  Language: English
9 .\"
10 .TH "WHEREIS" "1" "2022-02-17" "util\-linux 2.38" "User Commands"
11 .ie \n(.g .ds Aq \(aq
12 .el       .ds Aq '
13 .ss \n[.ss] 0
14 .nh
15 .ad l
16 .de URL
17 \fI\\$2\fP <\\$1>\\$3
18 ..
19 .als MTO URL
20 .if \n[.g] \{\
21 .  mso www.tmac
22 .  am URL
23 .    ad l
24 .  .
25 .  am MTO
26 .    ad l
27 .  .
28 .  LINKSTYLE blue R < >
29 .\}
30 .SH "NAME"
31 whereis \- locate the binary, source, and manual page files for a command
32 .SH "SYNOPSIS"
33 .sp
34 \fBwhereis\fP [options] [\fB\-BMS\fP \fIdirectory\fP... \fB\-f\fP] \fIname\fP...
35 .SH "DESCRIPTION"
36 .sp
37 \fBwhereis\fP locates the binary, source and manual files for the specified command names. The supplied names are first stripped of leading pathname components. Prefixes of \fBs.\fP resulting from use of source code control are also dealt with. \fBwhereis\fP then attempts to locate the desired program in the standard Linux places, and in the places specified by \fB$PATH\fP and \fB$MANPATH\fP.
38 .sp
39 The search restrictions (options \fB\-b\fP, \fB\-m\fP and \fB\-s\fP) are cumulative and apply to the subsequent \fIname\fP patterns on the command line. Any new search restriction resets the search mask. For example,
40 .RS 3
41 .ll -.6i
42 .sp
43 \fBwhereis \-bm ls tr \-m gcc\fP
44 .br
45 .RE
46 .ll
47 .sp
48 searches for "ls" and "tr" binaries and man pages, and for "gcc" man pages only.
49 .sp
50 The options \fB\-B\fP, \fB\-M\fP and \fB\-S\fP reset search paths for the subsequent \fIname\fP patterns. For example,
51 .RS 3
52 .ll -.6i
53 .sp
54 \fBwhereis \-m ls \-M /usr/share/man/man1 \-f cal\fP
55 .br
56 .RE
57 .ll
58 .sp
59 searches for "\fBls\fP" man pages in all default paths, but for "cal" in the \fI/usr/share/man/man1\fP directory only.
60 .SH "OPTIONS"
61 .sp
62 \fB\-b\fP
63 .RS 4
64 Search for binaries.
65 .RE
66 .sp
67 \fB\-m\fP
68 .RS 4
69 Search for manuals.
70 .RE
71 .sp
72 \fB\-s\fP
73 .RS 4
74 Search for sources.
75 .RE
76 .sp
77 \fB\-u\fP
78 .RS 4
79 Only show the command names that have unusual entries. A command is said to be unusual if it does not have just one entry of each explicitly requested type. Thus \(aq\fBwhereis \-m \-u *\fP\(aq asks for those files in the current directory which have no documentation file, or more than one.
80 .RE
81 .sp
82 \fB\-B\fP \fIlist\fP
83 .RS 4
84 Limit the places where \fBwhereis\fP searches for binaries, by a whitespace\-separated list of directories.
85 .RE
86 .sp
87 \fB\-M\fP \fIlist\fP
88 .RS 4
89 Limit the places where \fBwhereis\fP searches for manuals and documentation in Info format, by a whitespace\-separated list of directories.
90 .RE
91 .sp
92 \fB\-S\fP \fIlist\fP
93 .RS 4
94 Limit the places where \fBwhereis\fP searches for sources, by a whitespace\-separated list of directories.
95 .RE
96 .sp
97 \fB\-f\fP
98 .RS 4
99 Terminates the directory list and signals the start of filenames. It \fImust\fP be used when any of the \fB\-B\fP, \fB\-M\fP, or \fB\-S\fP options is used.
100 .RE
101 .sp
102 \fB\-l\fP
103 .RS 4
104 Output the list of effective lookup paths that \fBwhereis\fP is using. When none of \fB\-B\fP, \fB\-M\fP, or \fB\-S\fP is specified, the option will output the hard\-coded paths that the command was able to find on the system.
105 .RE
106 .sp
107 \fB\-h\fP, \fB\-\-help\fP
108 .RS 4
109 Display help text and exit.
110 .RE
111 .sp
112 \fB\-V\fP, \fB\-\-version\fP
113 .RS 4
114 Print version and exit.
115 .RE
116 .SH "FILE SEARCH PATHS"
117 .sp
118 By default \fBwhereis\fP tries to find files from hard\-coded paths, which are defined with glob patterns. The command attempts to use the contents of \fB$PATH\fP and \fB$MANPATH\fP environment variables as default search path. The easiest way to know what paths are in use is to add the \fB\-l\fP listing option. Effects of the \fB\-B\fP, \fB\-M\fP, and \fB\-S\fP are displayed with \fB\-l\fP.
119 .SH "ENVIRONMENT"
120 .sp
121 \fBWHEREIS_DEBUG\fP=all
122 .RS 4
123 enables debug output.
124 .RE
125 .SH "EXAMPLES"
126 .sp
127 To find all files in \fI/usr/bin\fP which are not documented in \fI/usr/man/man1\fP or have no source in \fI/usr/src\fP:
128 .sp
129 \fBcd /usr/bin\fP \fBwhereis \-u \-ms \-M /usr/man/man1 \-S /usr/src \-f *\fP
130 .SH "REPORTING BUGS"
131 .sp
132 For bug reports, use the issue tracker at \c
133 .URL "https://github.com/util\-linux/util\-linux/issues" "" "."
134 .SH "AVAILABILITY"
135 .sp
136 The \fBwhereis\fP command is part of the util\-linux package which can be downloaded from \c
137 .URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "."