]>
Commit | Line | Data |
---|---|---|
766a8229 | 1 | .\" |
bf1bc4c6 | 2 | .\" ippfind man page for CUPS. |
766a8229 | 3 | .\" |
bf1bc4c6 | 4 | .\" Copyright 2013-2014 by Apple Inc. |
766a8229 | 5 | .\" |
e3101897 | 6 | .\" Licensed under Apache License v2.0. See the file "LICENSE" for more information. |
766a8229 | 7 | .\" |
bf1bc4c6 | 8 | .TH ippfind 1 "CUPS" "11 June 2014" "Apple Inc." |
766a8229 | 9 | .SH NAME |
bf1bc4c6 | 10 | ippfind \- find internet printing protocol printers |
766a8229 MS |
11 | .SH SYNOPSIS |
12 | .B ippfind | |
13 | [ | |
14 | .I options | |
bf1bc4c6 MS |
15 | ] \fIregtype\fR[\fB,\fIsubtype\fR][\fB.\fIdomain\fB.\fR] ... [ |
16 | .I expression | |
0d1da748 MS |
17 | ... ] |
18 | .br | |
766a8229 MS |
19 | .B ippfind |
20 | [ | |
21 | .I options | |
0d1da748 MS |
22 | ] \fIname\fR[\fB.\fIregtype\fR[\fB.\fIdomain\fB.\fR]] ... [ |
23 | .I expression | |
24 | ... ] | |
25 | .br | |
766a8229 | 26 | .B ippfind |
0d1da748 MS |
27 | .B \-\-help |
28 | .br | |
766a8229 | 29 | .B ippfind |
0d1da748 | 30 | .B \-\-version |
766a8229 | 31 | .SH DESCRIPTION |
0d1da748 MS |
32 | \fBippfind\fR finds services registered with a DNS server or available through local devices. |
33 | Its primary purpose is to find IPP printers and show their URIs, show their current status, or run commands. | |
34 | .SS REGISTRATION TYPES | |
35 | \fBippfind\fR supports the following registration types: | |
e5528d42 MS |
36 | .TP 5 |
37 | _http._tcp | |
38 | HyperText Transport Protocol (HTTP, RFC 2616) | |
39 | .TP 5 | |
40 | _https._tcp | |
41 | Secure HyperText Transport Protocol (HTTPS, RFC 2818) | |
42 | .TP 5 | |
43 | _ipp._tcp | |
44 | Internet Printing Protocol (IPP, RFC 2911) | |
45 | .TP 5 | |
46 | _ipps._tcp | |
47 | Secure Internet Printing Protocol (IPPS, draft) | |
48 | .TP 5 | |
49 | _printer._tcp | |
50 | Line Printer Daemon (LPD, RFC 1179) | |
0d1da748 MS |
51 | .SS EXPRESSIONS |
52 | \fBippfind\fR supports expressions much like the | |
53 | .BR find (1) | |
54 | utility. | |
55 | However, unlike | |
56 | .BR find (1), | |
57 | \fBippfind\fR uses POSIX regular expressions instead of shell filename matching patterns. | |
58 | If \fI\-\-exec\fR, \fI\-l\fR, \fI\-\-ls\fR, \fI\-p\fR, \fI\-\-print\fR, \fI\-\-print\-name\fR, \fI\-q\fR, \fI\-\-quiet\fR, \fI\-s\fR, or \fI\-x\fR is not specified, \fBippfind\fR adds \fI\-\-print\fR to print the service URI of anything it finds. | |
59 | The following expressions are supported: | |
60 | .TP 5 | |
61 | \fB\-d \fIregex\fR | |
62 | .TP 5 | |
63 | \fB\-\-domain \fIregex\fR | |
766a8229 MS |
64 | True if the domain matches the given regular expression. |
65 | .TP 5 | |
0d1da748 | 66 | .B \-\-false |
766a8229 MS |
67 | Always false. |
68 | .TP 5 | |
0d1da748 | 69 | \fB\-h \fIregex\fR |
41743200 | 70 | .TP 5 |
0d1da748 | 71 | \fB\-\-host \fIregex\fR |
41743200 MS |
72 | True is the hostname matches the given regular expression. |
73 | .TP 5 | |
0d1da748 | 74 | .B \-l |
766a8229 | 75 | .TP 5 |
0d1da748 MS |
76 | .B \-\-ls |
77 | Lists attributes returned by Get-Printer-Attributes for IPP printers and traditional \fIfind\fR "-ls" output for HTTP URLs. | |
78 | The result is true if the URI is accessible, false otherwise. | |
766a8229 | 79 | .TP 5 |
0d1da748 | 80 | .B \-\-local |
766a8229 MS |
81 | True if the service is local to this computer. |
82 | .TP 5 | |
0d1da748 | 83 | \fB\-n \fIregex\fR |
766a8229 | 84 | .TP 5 |
0d1da748 | 85 | \fB\-\-name \fIregex\fR |
766a8229 MS |
86 | True if the service instance name matches the given regular expression. |
87 | .TP 5 | |
0d1da748 | 88 | \fB\-\-path \fIregex\fR |
766a8229 MS |
89 | True if the URI resource path matches the given regular expression. |
90 | .TP 5 | |
0d1da748 | 91 | \fB\-P \fInumber\fR[\fB-\fInumber\fR] |
41743200 | 92 | .TP 5 |
0d1da748 | 93 | \fB\-\-port \fInumber\fR[\fB-\fInumber\fR] |
41743200 MS |
94 | True if the port matches the given number or range. |
95 | .TP 5 | |
0d1da748 | 96 | .B \-p |
766a8229 | 97 | .TP 5 |
0d1da748 MS |
98 | .B \-\-print |
99 | Prints the URI if the result of previous expressions is true. | |
100 | The result is always true. | |
766a8229 | 101 | .TP 5 |
0d1da748 | 102 | .B \-q |
766a8229 | 103 | .TP 5 |
0d1da748 | 104 | .B \-\-quiet |
766a8229 MS |
105 | Quiet mode - just returns the exit codes below. |
106 | .TP 5 | |
0d1da748 | 107 | .B \-r |
766a8229 | 108 | .TP 5 |
0d1da748 | 109 | .B \-\-remote |
766a8229 MS |
110 | True if the service is not local to this computer. |
111 | .TP 5 | |
0d1da748 | 112 | .B \-s |
766a8229 | 113 | .TP 5 |
0d1da748 MS |
114 | .B \-\-print\-name |
115 | Prints the service instance name if the result of previous expressions is true. | |
116 | The result is always true. | |
766a8229 | 117 | .TP 5 |
0d1da748 | 118 | .B \-\-true |
766a8229 MS |
119 | Always true. |
120 | .TP 5 | |
0d1da748 | 121 | \fB\-t \fIkey\fR |
766a8229 | 122 | .TP 5 |
0d1da748 | 123 | \fB\-\-txt \fIkey\fR |
766a8229 MS |
124 | True if the TXT record contains the named key. |
125 | .TP 5 | |
0d1da748 MS |
126 | \fB\-\-txt\-\fIkey regex\fR |
127 | True if the TXT record contains the named key and matches the given regular expression. | |
766a8229 | 128 | .TP 5 |
0d1da748 | 129 | \fB\-u \fIregex\fR |
766a8229 | 130 | .TP 5 |
0d1da748 | 131 | \fB\-\-uri \fIregex\fR |
766a8229 | 132 | True if the URI matches the given regular expression. |
e5528d42 | 133 | .TP 5 |
0d1da748 | 134 | \fB\-x \fIutility \fR[ \fIargument \fR... ] \fB;\fR |
e5528d42 | 135 | .TP 5 |
0d1da748 MS |
136 | \fB\-\-exec \fIutility \fR[ \fIargument \fR... ] \fB;\fR |
137 | Executes the specified program if the current result is true. | |
138 | "{foo}" arguments are replaced with the corresponding value - see SUBSTITUTIONS below. | |
766a8229 MS |
139 | .PP |
140 | Expressions may also contain modifiers: | |
141 | .TP 5 | |
0d1da748 | 142 | \fB( \fIexpression \fB)\fR |
766a8229 MS |
143 | Group the result of expressions. |
144 | .TP 5 | |
0d1da748 | 145 | \fB! \fIexpression\fR |
766a8229 | 146 | .TP 5 |
0d1da748 | 147 | \fB\-\-not \fIexpression\fR |
766a8229 MS |
148 | Unary NOT of the expression. |
149 | .TP 5 | |
0d1da748 | 150 | \fIexpression expression\fR |
766a8229 | 151 | .TP 5 |
0d1da748 | 152 | \fIexpression \fB\-\-and \fIexpression\fR |
766a8229 MS |
153 | Logical AND of expressions. |
154 | .TP 5 | |
0d1da748 | 155 | \fIexpression \fB\-\-or \fIexpression\fR |
766a8229 | 156 | Logical OR of expressions. |
0d1da748 MS |
157 | .SS SUBSTITUTIONS |
158 | The substitutions for "{foo}" in \fI\-e\fR and \fI\-\-exec\fR are: | |
766a8229 | 159 | .TP 5 |
0d1da748 | 160 | .B {service_domain} |
766a8229 MS |
161 | Domain name, e.g., "example.com.", "local.", etc. |
162 | .TP 5 | |
0d1da748 | 163 | .B {service_hostname} |
766a8229 MS |
164 | Fully-qualified domain name, e.g., "printer.example.com.", "printer.local.", etc. |
165 | .TP 5 | |
0d1da748 | 166 | .B {service_name} |
766a8229 MS |
167 | Service instance name, e.g., "My Fine Printer". |
168 | .TP 5 | |
0d1da748 | 169 | .B {service_port} |
766a8229 MS |
170 | Port number for server, typically 631 for IPP and 80 for HTTP. |
171 | .TP 5 | |
0d1da748 | 172 | .B {service_regtype} |
766a8229 MS |
173 | DNS-SD registration type, e.g., "_ipp._tcp", "_http._tcp", etc. |
174 | .TP 5 | |
0d1da748 | 175 | .B {service_scheme} |
766a8229 MS |
176 | URI scheme for DNS-SD registration type, e.g., "ipp", "http", etc. |
177 | .TP 5 | |
0d1da748 MS |
178 | .B {} |
179 | .TP 5 | |
180 | .B {service_uri} | |
766a8229 MS |
181 | URI for service, e.g., "ipp://printer.local./ipp/print", "http://printer.local./", etc. |
182 | .TP 5 | |
0d1da748 | 183 | \fB{txt_\fIkey\fB}\fR |
766a8229 | 184 | Value of TXT record \fIkey\fR (lowercase). |
0d1da748 | 185 | .SH OPTIONS |
52f7b14a | 186 | \fBippfind\fR supports the following options: |
0d1da748 MS |
187 | .TP 5 |
188 | .B \-\-help | |
189 | Show program help. | |
190 | .TP 5 | |
191 | .B \-\-version | |
192 | Show program version. | |
193 | .TP 5 | |
194 | .B \-4 | |
195 | Use IPv4 when listing. | |
196 | .TP 5 | |
197 | .B \-6 | |
198 | Use IPv6 when listing. | |
766a8229 | 199 | .TP 5 |
0d1da748 MS |
200 | \fB\-T \fIseconds\fR |
201 | Specify find timeout in seconds. | |
202 | If 1 or less, \fBippfind\fR stops as soon as it thinks it has found everything. | |
203 | The default timeout is 1 second. | |
204 | .TP 5 | |
205 | \fB\-V \fIversion\fR | |
206 | Specifies the IPP version when listing. | |
207 | Supported values are "1.1", "2.0", "2.1", and "2.2". | |
208 | .SH EXIT STATUS | |
209 | \fBippfind\fR returns 0 if the result for all processed expressions is true, 1 if the result of any processed expression is false, 2 if browsing or any query or resolution failed, 3 if an undefined option or invalid expression was specified, and 4 if it ran out of memory. | |
210 | .SH ENVIRONMENT | |
211 | When executing a program, \fBippfind\fR sets the following environment variables for the matching service registration: | |
212 | .TP 5 | |
213 | .B IPPFIND_SERVICE_DOMAIN | |
766a8229 MS |
214 | Domain name, e.g., "example.com.", "local.", etc. |
215 | .TP 5 | |
0d1da748 | 216 | .B IPPFIND_SERVICE_HOSTNAME |
766a8229 MS |
217 | Fully-qualified domain name, e.g., "printer.example.com.", "printer.local.", etc. |
218 | .TP 5 | |
0d1da748 | 219 | .B IPPFIND_SERVICE_NAME |
766a8229 MS |
220 | Service instance name, e.g., "My Fine Printer". |
221 | .TP 5 | |
0d1da748 | 222 | .B IPPFIND_SERVICE_PORT |
766a8229 MS |
223 | Port number for server, typically 631 for IPP and 80 for HTTP. |
224 | .TP 5 | |
0d1da748 | 225 | .B IPPFIND_SERVICE_REGTYPE |
766a8229 MS |
226 | DNS-SD registration type, e.g., "_ipp._tcp", "_http._tcp", etc. |
227 | .TP 5 | |
0d1da748 | 228 | .B IPPFIND_SERVICE_SCHEME |
766a8229 MS |
229 | URI scheme for DNS-SD registration type, e.g., "ipp", "http", etc. |
230 | .TP 5 | |
0d1da748 | 231 | .B IPPFIND_SERVICE_URI |
766a8229 MS |
232 | URI for service, e.g., "ipp://printer.local./ipp/print", "http://printer.local./", etc. |
233 | .TP 5 | |
0d1da748 | 234 | .B IPPFIND_TXT_\fIKEY\fR |
766a8229 | 235 | Values of TXT record \fIKEY\fR (uppercase). |
0d1da748 MS |
236 | .SH EXAMPLES |
237 | To show the status of all registered IPP printers on your network, run: | |
238 | .nf | |
766a8229 | 239 | |
0d1da748 | 240 | ippfind \-\-ls |
766a8229 | 241 | |
0d1da748 MS |
242 | .fi |
243 | Similarly, to send a PostScript test page to every PostScript printer, run: | |
244 | .nf | |
766a8229 | 245 | |
0d1da748 MS |
246 | ippfind \-\-txt\-pdl application/postscript \-\-exec ipptool |
247 | \-f onepage\-letter.ps '{}' print\-job.test \\; | |
248 | .fi | |
249 | .SH SEE ALSO | |
250 | .BR ipptool (1) | |
766a8229 | 251 | .SH COPYRIGHT |
f61dfc0d | 252 | Copyright \[co] 2013-2018 by Apple Inc. |