2 .\" ippfind man page for CUPS.
4 .\" Copyright 2013-2014 by Apple Inc.
6 .\" Licensed under Apache License v2.0. See the file "LICENSE" for more information.
8 .TH ippfind 1 "CUPS" "11 June 2014" "Apple Inc."
10 ippfind \- find internet printing protocol printers
15 ] \fIregtype\fR[\fB,\fIsubtype\fR][\fB.\fIdomain\fB.\fR] ... [
22 ] \fIname\fR[\fB.\fIregtype\fR[\fB.\fIdomain\fB.\fR]] ... [
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:
38 HyperText Transport Protocol (HTTP, RFC 2616)
41 Secure HyperText Transport Protocol (HTTPS, RFC 2818)
44 Internet Printing Protocol (IPP, RFC 2911)
47 Secure Internet Printing Protocol (IPPS, draft)
50 Line Printer Daemon (LPD, RFC 1179)
52 \fBippfind\fR supports expressions much like the
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:
63 \fB\-\-domain \fIregex\fR
64 True if the domain matches the given regular expression.
71 \fB\-\-host \fIregex\fR
72 True is the hostname matches the given regular expression.
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.
81 True if the service is local to this computer.
85 \fB\-\-name \fIregex\fR
86 True if the service instance name matches the given regular expression.
88 \fB\-\-path \fIregex\fR
89 True if the URI resource path matches the given regular expression.
91 \fB\-P \fInumber\fR[\fB-\fInumber\fR]
93 \fB\-\-port \fInumber\fR[\fB-\fInumber\fR]
94 True if the port matches the given number or range.
99 Prints the URI if the result of previous expressions is true.
100 The result is always true.
105 Quiet mode - just returns the exit codes below.
110 True if the service is not local to this computer.
115 Prints the service instance name if the result of previous expressions is true.
116 The result is always true.
124 True if the TXT record contains the named key.
126 \fB\-\-txt\-\fIkey regex\fR
127 True if the TXT record contains the named key and matches the given regular expression.
131 \fB\-\-uri \fIregex\fR
132 True if the URI matches the given regular expression.
134 \fB\-x \fIutility \fR[ \fIargument \fR... ] \fB;\fR
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.
140 Expressions may also contain modifiers:
142 \fB( \fIexpression \fB)\fR
143 Group the result of expressions.
145 \fB! \fIexpression\fR
147 \fB\-\-not \fIexpression\fR
148 Unary NOT of the expression.
150 \fIexpression expression\fR
152 \fIexpression \fB\-\-and \fIexpression\fR
153 Logical AND of expressions.
155 \fIexpression \fB\-\-or \fIexpression\fR
156 Logical OR of expressions.
158 The substitutions for "{foo}" in \fI\-e\fR and \fI\-\-exec\fR are:
161 Domain name, e.g., "example.com.", "local.", etc.
163 .B {service_hostname}
164 Fully-qualified domain name, e.g., "printer.example.com.", "printer.local.", etc.
167 Service instance name, e.g., "My Fine Printer".
170 Port number for server, typically 631 for IPP and 80 for HTTP.
173 DNS-SD registration type, e.g., "_ipp._tcp", "_http._tcp", etc.
176 URI scheme for DNS-SD registration type, e.g., "ipp", "http", etc.
181 URI for service, e.g., "ipp://printer.local./ipp/print", "http://printer.local./", etc.
183 \fB{txt_\fIkey\fB}\fR
184 Value of TXT record \fIkey\fR (lowercase).
186 \fBippfind\fR supports the following options:
192 Show program version.
195 Use IPv4 when listing.
198 Use IPv6 when listing.
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.
206 Specifies the IPP version when listing.
207 Supported values are "1.1", "2.0", "2.1", and "2.2".
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.
211 When executing a program, \fBippfind\fR sets the following environment variables for the matching service registration:
213 .B IPPFIND_SERVICE_DOMAIN
214 Domain name, e.g., "example.com.", "local.", etc.
216 .B IPPFIND_SERVICE_HOSTNAME
217 Fully-qualified domain name, e.g., "printer.example.com.", "printer.local.", etc.
219 .B IPPFIND_SERVICE_NAME
220 Service instance name, e.g., "My Fine Printer".
222 .B IPPFIND_SERVICE_PORT
223 Port number for server, typically 631 for IPP and 80 for HTTP.
225 .B IPPFIND_SERVICE_REGTYPE
226 DNS-SD registration type, e.g., "_ipp._tcp", "_http._tcp", etc.
228 .B IPPFIND_SERVICE_SCHEME
229 URI scheme for DNS-SD registration type, e.g., "ipp", "http", etc.
231 .B IPPFIND_SERVICE_URI
232 URI for service, e.g., "ipp://printer.local./ipp/print", "http://printer.local./", etc.
234 .B IPPFIND_TXT_\fIKEY\fR
235 Values of TXT record \fIKEY\fR (uppercase).
237 To show the status of all registered IPP printers on your network, run:
243 Similarly, to send a PostScript test page to every PostScript printer, run:
246 ippfind \-\-txt\-pdl application/postscript \-\-exec ipptool
247 \-f onepage\-letter.ps '{}' print\-job.test \\;
252 Copyright \[co] 2013-2015 by Apple Inc.