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