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