1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
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 </i>] regtype[,subtype][.domain.] ... [
22 </i>] name[.regtype[.domain.]] ... [
29 <h2 class=
"title"><a name=
"SUPPORTED_REGISTRATION_TYPES">Supported Registration Types
</a></h2>
30 <i>ippfind
</i> supports the following registration types:
34 <dd>HyperText Transport Protocol (HTTP, RFC
2616)
38 <dd>Secure HyperText Transport Protocol (HTTPS, RFC
2818)
42 <dd>Internet Printing Protocol (IPP, RFC
2911)
46 <dd>Secure Internet Printing Protocol (IPPS, draft)
50 <dd>Line Printer Daemon (LPD, RFC
1179)
54 <h2 class=
"title"><a name=
"OPTIONS">Options
</a></h2>
62 <dd>Show program version
66 <dd>Use IPv4 when listing
70 <dd>Use IPv6 when listing
74 <dd>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.
78 <dd>Specifies the IPP version when listing. Supported values are
1.1,
2.0,
2.1, and
2.2.
82 <h2 class=
"title"><a name=
"DESCRIPTION">Description
</a></h2>
83 <i>ippfind
</i> finds printer services registered with the local DNS infrastructure or available through the local links.
85 <h2 class=
"title"><a name=
"EXPRESSIONS">Expressions
</a></h2>
86 <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 -e, --exec, -l, --ls, -p, --print, --print-name, -q, --quiet, or -s is not specified,
<i>ippfind
</i> adds --print to print the service URI of anything it finds. The following expressions are supported:
93 <dd>True if the domain matches the given regular expression.
95 <dt>-e utility [argument ...] ;
98 <dt>--exec utility [argument ...] ;
100 <dd>Executes the specified program if the current result is true.
"{foo}" arguments are replaced with the corresponding value - see SUBSTITUTIONS below.
111 <dd>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.
115 <dd>True if the service is local to this computer.
122 <dd>True if the service instance name matches the given regular expression.
126 <dd>True if the URI resource path matches the given regular expression.
133 <dd>Prints the URI if the result of previous expressions is true. The result is always true.
140 <dd>Quiet mode - just returns the exit codes below.
147 <dd>True if the service is not local to this computer.
154 <dd>Prints the service instance name if the result of previous expressions is true. The result is always true.
165 <dd>True if the TXT record contains the named key.
167 <dt>--txt-
<i>key
</i> regex
169 <dd>True if the TXT record contains the named key and matches the given regular
177 <dd>True if the URI matches the given regular expression.
180 <p>Expressions may also contain modifiers:
184 <dd>Group the result of expressions.
191 <dd>Unary NOT of the expression.
193 <dt>expression expression
196 <dt>expression --and expression
198 <dd>Logical AND of expressions.
200 <dt>expression --or expression
202 <dd>Logical OR of expressions.
206 <h2 class=
"title"><a name=
"SUBSTITUTIONS">Substitutions
</a></h2>
207 The substitutions for
"{foo}" in -e and --exec are:
215 <dd>Domain name, e.g.,
"example.com.",
"local.", etc.
217 <dt>{service_hostname}
219 <dd>Fully-qualified domain name, e.g.,
"printer.example.com.",
"printer.local.", etc.
223 <dd>Service instance name, e.g.,
"My Fine Printer".
227 <dd>Port number for server, typically
631 for IPP and
80 for HTTP.
229 <dt>{service_regtype}
231 <dd>DNS-SD registration type, e.g.,
"_ipp._tcp",
"_http._tcp", etc.
235 <dd>URI scheme for DNS-SD registration type, e.g.,
"ipp",
"http", etc.
239 <dd>URI for service, e.g.,
"ipp://printer.local./ipp/print",
"<a href='http://printer.local./",'
>http://printer.local./
",</a> etc.
243 <dd>Value of TXT record <i>key</i> (lowercase).
247 <h2 class="title
"><a name="ENVIRONMENT_VARIABLES
">Environment Variables</a></h2>
248 When executing a program, <i>ippfind</i> sets the following environment variables for the matching service registration:
250 <dt>IPPFIND_SERVICE_DOMAIN
252 <dd>Domain name, e.g., "example.com.
", "local.
", etc.
254 <dt>IPPFIND_SERVICE_HOSTNAME
256 <dd>Fully-qualified domain name, e.g., "printer.example.com.
", "printer.local.
", etc.
258 <dt>IPPFIND_SERVICE_NAME
260 <dd>Service instance name, e.g., "My Fine Printer
".
262 <dt>IPPFIND_SERVICE_PORT
264 <dd>Port number for server, typically 631 for IPP and 80 for HTTP.
266 <dt>IPPFIND_SERVICE_REGTYPE
268 <dd>DNS-SD registration type, e.g., "_ipp._tcp
", "_http._tcp
", etc.
270 <dt>IPPFIND_SERVICE_SCHEME
272 <dd>URI scheme for DNS-SD registration type, e.g., "ipp
", "http
", etc.
274 <dt>IPPFIND_SERVICE_URI
276 <dd>URI for service, e.g., "ipp://printer.local./ipp/print
", "<a href='http://printer.local./
",'>http://printer.local./",
</a> etc.
278 <dt>IPPFIND_TXT_
<i>KEY
</i>
280 <dd>Values of TXT record
<i>KEY
</i> (uppercase).
284 <h2 class=
"title"><a name=
"EXIT_CODES">Exit Codes
</a></h2>
285 <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.
287 <h2 class=
"title"><a name=
"SEE_ALSO">See Also
</a></h2>
288 <a href='man-ipptool.html?TOPIC=Man+Pages'
>ipptool(
1)
</a>
290 <h2 class=
"title"><a name=
"COPYRIGHT">Copyright
</a></h2>
291 Copyright
2013 by Apple Inc.