3 <!-- SECTION: Man Pages -->
5 <link rel=
"stylesheet" type=
"text/css" href=
"../cups-printable.css">
6 <title>ippfind(
1)
</title>
9 <h1 class=
"title">ippfind(
1)
</h1>
10 <h2 class=
"title"><a name=
"NAME">Name
</a></h2>
11 ippfind - find internet printing protocol printers
12 <h2 class=
"title"><a name=
"SYNOPSIS">Synopsis
</a></h2>
16 ] regtype[,subtype][.domain.] ... [
17 <i>expression
</i> <i>...
</i>
22 ] name[.regtype[.domain.]] ... [
23 <i>expression
</i> <i>...
</i>
29 <h2 class=
"title"><a name=
"OPTIONS">Options
</a></h2>
30 <p style=
"margin-left: 5.0em; text-indent: -5.0em">--help
33 <p style=
"margin-left: 5.0em; text-indent: -5.0em">--version
36 <p style=
"margin-left: 5.0em; text-indent: -5.0em">-
4
39 <p style=
"margin-left: 5.0em; text-indent: -5.0em">-
6
42 <p style=
"margin-left: 5.0em; text-indent: -5.0em">-T seconds
44 Specify find timeout in seconds. If
1 or less,
<i>ippfind
</i> stops as soon as it thinks it has found everything. The default is
1 second.
45 <p style=
"margin-left: 5.0em; text-indent: -5.0em">-V version
47 Specifies the IPP version when listing. Supported values are
1.1,
2.0,
2.1, and
2.2.
49 <h2 class=
"title"><a name=
"DESCRIPTION">Description
</a></h2>
50 <i>ippfind
</i> 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:
54 Similarly, to send a PostScript test page to every PostScript printer, run:
56 ippfind --txt-pdl application/postscript --exec ipptool \
57 -f onepage-letter.ps '{}' print-job.test \;
60 <h2 class=
"title"><a name=
"REGISTRATION_TYPES">Registration Types
</a></h2>
61 <i>ippfind
</i> supports the following registration types:
62 <p style=
"margin-left: 5.0em; text-indent: -5.0em">_http._tcp
64 HyperText Transport Protocol (HTTP, RFC
2616)
65 <p style=
"margin-left: 5.0em; text-indent: -5.0em">_https._tcp
67 Secure HyperText Transport Protocol (HTTPS, RFC
2818)
68 <p style=
"margin-left: 5.0em; text-indent: -5.0em">_ipp._tcp
70 Internet Printing Protocol (IPP, RFC
2911)
71 <p style=
"margin-left: 5.0em; text-indent: -5.0em">_ipps._tcp
73 Secure Internet Printing Protocol (IPPS, draft)
74 <p style=
"margin-left: 5.0em; text-indent: -5.0em">_printer._tcp
76 Line Printer Daemon (LPD, RFC
1179)
78 <h2 class=
"title"><a name=
"EXPRESSIONS">Expressions
</a></h2>
79 <i>ippfind
</i> supports expressions much like the
<i>find(
1)
</i> utility. However, unlike
<i>find
</i>,
<i>ippfind
</i> 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,
<i>ippfind
</i> adds --print to print the service URI of anything it finds. The following expressions are supported:
80 <p style=
"margin-left: 5.0em; text-indent: -5.0em">-d regex
82 <p style=
"margin-left: 5.0em; text-indent: -5.0em">--domain regex
84 True if the domain matches the given regular expression.
85 <p style=
"margin-left: 5.0em; text-indent: -5.0em">--false
88 <p style=
"margin-left: 5.0em; text-indent: -5.0em">-h regex
90 <p style=
"margin-left: 5.0em; text-indent: -5.0em">--host regex
92 True is the hostname matches the given regular expression.
93 <p style=
"margin-left: 5.0em; text-indent: -5.0em">-l
95 <p style=
"margin-left: 5.0em; text-indent: -5.0em">--ls
97 Lists attributes returned by Get-Printer-Attributes for IPP printers and traditional
<i>find
</i> "-ls" output for HTTP URLs. The result is true if the URI is accessible, false otherwise.
98 <p style=
"margin-left: 5.0em; text-indent: -5.0em">--local
100 True if the service is local to this computer.
101 <p style=
"margin-left: 5.0em; text-indent: -5.0em">-n regex
103 <p style=
"margin-left: 5.0em; text-indent: -5.0em">--name regex
105 True if the service instance name matches the given regular expression.
106 <p style=
"margin-left: 5.0em; text-indent: -5.0em">--path regex
108 True if the URI resource path matches the given regular expression.
109 <p style=
"margin-left: 5.0em; text-indent: -5.0em">-P number[-number]
111 <p style=
"margin-left: 5.0em; text-indent: -5.0em">--port number[-number]
113 True if the port matches the given number or range.
114 <p style=
"margin-left: 5.0em; text-indent: -5.0em">-p
116 <p style=
"margin-left: 5.0em; text-indent: -5.0em">--print
118 Prints the URI if the result of previous expressions is true. The result is always true.
119 <p style=
"margin-left: 5.0em; text-indent: -5.0em">-q
121 <p style=
"margin-left: 5.0em; text-indent: -5.0em">--quiet
123 Quiet mode - just returns the exit codes below.
124 <p style=
"margin-left: 5.0em; text-indent: -5.0em">-r
126 <p style=
"margin-left: 5.0em; text-indent: -5.0em">--remote
128 True if the service is not local to this computer.
129 <p style=
"margin-left: 5.0em; text-indent: -5.0em">-s
131 <p style=
"margin-left: 5.0em; text-indent: -5.0em">--print-name
133 Prints the service instance name if the result of previous expressions is true. The result is always true.
134 <p style=
"margin-left: 5.0em; text-indent: -5.0em">--true
137 <p style=
"margin-left: 5.0em; text-indent: -5.0em">-t key
139 <p style=
"margin-left: 5.0em; text-indent: -5.0em">--txt key
141 True if the TXT record contains the named key.
142 <p style=
"margin-left: 5.0em; text-indent: -5.0em">--txt-
<i>key
</i> regex
144 True if the TXT record contains the named key and matches the given regular
146 <p style=
"margin-left: 5.0em; text-indent: -5.0em">-u regex
148 <p style=
"margin-left: 5.0em; text-indent: -5.0em">--uri regex
150 True if the URI matches the given regular expression.
151 <p style=
"margin-left: 5.0em; text-indent: -5.0em">-x utility [argument ...] ;
153 <p style=
"margin-left: 5.0em; text-indent: -5.0em">--exec utility [argument ...] ;
155 Executes the specified program if the current result is true.
"{foo}" arguments are replaced with the corresponding value - see SUBSTITUTIONS below.
156 <p>Expressions may also contain modifiers:
157 <p style=
"margin-left: 5.0em; text-indent: -5.0em">( expression )
159 Group the result of expressions.
160 <p style=
"margin-left: 5.0em; text-indent: -5.0em">! expression
162 <p style=
"margin-left: 5.0em; text-indent: -5.0em">--not expression
164 Unary NOT of the expression.
165 <p style=
"margin-left: 5.0em; text-indent: -5.0em">expression expression
167 <p style=
"margin-left: 5.0em; text-indent: -5.0em">expression --and expression
169 Logical AND of expressions.
170 <p style=
"margin-left: 5.0em; text-indent: -5.0em">expression --or expression
172 Logical OR of expressions.
174 <h2 class=
"title"><a name=
"SUBSTITUTIONS">Substitutions
</a></h2>
175 The substitutions for
"{foo}" in -e and --exec are:
176 <p style=
"margin-left: 5.0em; text-indent: -5.0em">{}
179 <p style=
"margin-left: 5.0em; text-indent: -5.0em">{service_domain}
181 Domain name, e.g.,
"example.com.",
"local.", etc.
182 <p style=
"margin-left: 5.0em; text-indent: -5.0em">{service_hostname}
184 Fully-qualified domain name, e.g.,
"printer.example.com.",
"printer.local.", etc.
185 <p style=
"margin-left: 5.0em; text-indent: -5.0em">{service_name}
187 Service instance name, e.g.,
"My Fine Printer".
188 <p style=
"margin-left: 5.0em; text-indent: -5.0em">{service_port}
190 Port number for server, typically
631 for IPP and
80 for HTTP.
191 <p style=
"margin-left: 5.0em; text-indent: -5.0em">{service_regtype}
193 DNS-SD registration type, e.g.,
"_ipp._tcp",
"_http._tcp", etc.
194 <p style=
"margin-left: 5.0em; text-indent: -5.0em">{service_scheme}
196 URI scheme for DNS-SD registration type, e.g.,
"ipp",
"http", etc.
197 <p style=
"margin-left: 5.0em; text-indent: -5.0em">{service_uri}
199 URI for service, e.g.,
"ipp://printer.local./ipp/print",
"<a href="http://printer.local./
", etc.">http://printer.local./
", etc.</a> etc.
200 <p style="margin-left:
5.0em; text-indent: -
5.0em
">{txt_<i>key</i>}
202 Value of TXT record <i>key</i> (lowercase).
204 <h2 class="title
"><a name="ENVIRONMENT_VARIABLES
">Environment Variables</a></h2>
205 When executing a program, <i>ippfind</i> sets the following environment variables for the matching service registration:
206 <p style="margin-left:
5.0em; text-indent: -
5.0em
">IPPFIND_SERVICE_DOMAIN
208 Domain name, e.g., "example.com.
", "local.
", etc.
209 <p style="margin-left:
5.0em; text-indent: -
5.0em
">IPPFIND_SERVICE_HOSTNAME
211 Fully-qualified domain name, e.g., "printer.example.com.
", "printer.local.
", etc.
212 <p style="margin-left:
5.0em; text-indent: -
5.0em
">IPPFIND_SERVICE_NAME
214 Service instance name, e.g., "My Fine Printer
".
215 <p style="margin-left:
5.0em; text-indent: -
5.0em
">IPPFIND_SERVICE_PORT
217 Port number for server, typically 631 for IPP and 80 for HTTP.
218 <p style="margin-left:
5.0em; text-indent: -
5.0em
">IPPFIND_SERVICE_REGTYPE
220 DNS-SD registration type, e.g., "_ipp._tcp
", "_http._tcp
", etc.
221 <p style="margin-left:
5.0em; text-indent: -
5.0em
">IPPFIND_SERVICE_SCHEME
223 URI scheme for DNS-SD registration type, e.g., "ipp
", "http
", etc.
224 <p style="margin-left:
5.0em; text-indent: -
5.0em
">IPPFIND_SERVICE_URI
226 URI for service, e.g., "ipp://printer.local./ipp/print
", "<a href=
"http://printer.local./", etc.
">http://printer.local./", etc.
</a> etc.
227 <p style=
"margin-left: 5.0em; text-indent: -5.0em">IPPFIND_TXT_
<i>KEY
</i>
229 Values of TXT record
<i>KEY
</i> (uppercase).
231 <h2 class=
"title"><a name=
"EXIT_CODES">Exit Codes
</a></h2>
232 <i>ippfind
</i> 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.
234 <h2 class=
"title"><a name=
"SEE_ALSO">See Also
</a></h2>
237 <h2 class=
"title"><a name=
"COPYRIGHT">Copyright
</a></h2>
238 Copyright
2013 by Apple Inc.