4 .\" ippfind man page for CUPS.
6 .\" Copyright 2013 by Apple Inc.
8 .\" These coded instructions, statements, and computer programs are the
9 .\" property of Apple Inc. and are protected by Federal copyright
10 .\" law. Distribution and use rights are outlined in the file "LICENSE.txt"
11 .\" which should have been included with this file. If this file is
12 .\" file is missing or damaged, see the license at "http://www.cups.org/".
14 .TH ippfind 1 "CUPS" "6 June 2013" "Apple Inc."
16 ippfind - find internet printing protocol printers
21 ] regtype[,subtype][.domain.] ... [
27 ] name[.regtype[.domain.]] ... [
49 Specify find timeout in seconds. If 1 or less, \fIippfind\fR stops as soon as it thinks it has found everything. The default is 1 second.
52 Specifies the IPP version when listing. Supported values are 1.1, 2.0, 2.1, and 2.2.
55 \fIippfind\fR finds services registered with a DNS server or available through local devices. Its primary purpose is to find IPP printers and show their URIs, show their current status, or run commands. For example, to show the status of all registered IPP printers on your network, run:
59 Similarly, to send a PostScript test page to every PostScript printer, run:
61 ippfind --txt-pdl application/postscript --exec ipptool \\
62 -f onepage-letter.ps '{}' print-job.test \\;
65 .SH REGISTRATION TYPES
66 \fIippfind\fR supports the following registration types:
69 HyperText Transport Protocol (HTTP, RFC 2616)
72 Secure HyperText Transport Protocol (HTTPS, RFC 2818)
75 Internet Printing Protocol (IPP, RFC 2911)
78 Secure Internet Printing Protocol (IPPS, draft)
81 Line Printer Daemon (LPD, RFC 1179)
84 \fIippfind\fR supports expressions much like the \fIfind(1)\fR utility. However, unlike \fIfind\fR, \fIippfind\fR uses POSIX regular expressions instead of shell filename matching patterns. If --exec, -l, --ls, -p, --print, --print-name, -q, --quiet, -s, or -x is not specified, \fIippfind\fR adds --print to print the service URI of anything it finds. The following expressions are supported:
89 True if the domain matches the given regular expression.
97 True is the hostname matches the given regular expression.
102 Lists attributes returned by Get-Printer-Attributes for IPP printers and traditional \fIfind\fR "-ls" output for HTTP URLs. The result is true if the URI is accessible, false otherwise.
105 True if the service is local to this computer.
110 True if the service instance name matches the given regular expression.
113 True if the URI resource path matches the given regular expression.
117 --port number[-number]
118 True if the port matches the given number or range.
123 Prints the URI if the result of previous expressions is true. The result is always true.
128 Quiet mode - just returns the exit codes below.
133 True if the service is not local to this computer.
138 Prints the service instance name if the result of previous expressions is true. The result is always true.
146 True if the TXT record contains the named key.
148 --txt-\fIkey\fR regex
149 True if the TXT record contains the named key and matches the given regular
155 True if the URI matches the given regular expression.
157 -x utility [argument ...] ;
159 --exec utility [argument ...] ;
160 Executes the specified program if the current result is true. "{foo}" arguments are replaced with the corresponding value - see SUBSTITUTIONS below.
162 Expressions may also contain modifiers:
165 Group the result of expressions.
170 Unary NOT of the expression.
172 expression expression
174 expression --and expression
175 Logical AND of expressions.
177 expression --or expression
178 Logical OR of expressions.
181 The substitutions for "{foo}" in -e and --exec are:
187 Domain name, e.g., "example.com.", "local.", etc.
190 Fully-qualified domain name, e.g., "printer.example.com.", "printer.local.", etc.
193 Service instance name, e.g., "My Fine Printer".
196 Port number for server, typically 631 for IPP and 80 for HTTP.
199 DNS-SD registration type, e.g., "_ipp._tcp", "_http._tcp", etc.
202 URI scheme for DNS-SD registration type, e.g., "ipp", "http", etc.
205 URI for service, e.g., "ipp://printer.local./ipp/print", "http://printer.local./", etc.
208 Value of TXT record \fIkey\fR (lowercase).
210 .SH ENVIRONMENT VARIABLES
211 When executing a program, \fIippfind\fR sets the following environment variables for the matching service registration:
213 IPPFIND_SERVICE_DOMAIN
214 Domain name, e.g., "example.com.", "local.", etc.
216 IPPFIND_SERVICE_HOSTNAME
217 Fully-qualified domain name, e.g., "printer.example.com.", "printer.local.", etc.
220 Service instance name, e.g., "My Fine Printer".
223 Port number for server, typically 631 for IPP and 80 for HTTP.
225 IPPFIND_SERVICE_REGTYPE
226 DNS-SD registration type, e.g., "_ipp._tcp", "_http._tcp", etc.
228 IPPFIND_SERVICE_SCHEME
229 URI scheme for DNS-SD registration type, e.g., "ipp", "http", etc.
232 URI for service, e.g., "ipp://printer.local./ipp/print", "http://printer.local./", etc.
234 IPPFIND_TXT_\fIKEY\fR
235 Values of TXT record \fIKEY\fR (uppercase).
238 \fIippfind\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.
244 Copyright 2013 by Apple Inc.