]> git.ipfire.org Git - thirdparty/cups.git/blame - doc/help/man-ippfind.html
More man page updates.
[thirdparty/cups.git] / doc / help / man-ippfind.html
CommitLineData
c277f98c 1<!DOCTYPE HTML>
766a8229
MS
2<html>
3<!-- SECTION: Man Pages -->
4<head>
5 <link rel="stylesheet" type="text/css" href="../cups-printable.css">
6 <title>ippfind(1)</title>
7</head>
8<body>
9<h1 class="title">ippfind(1)</h1>
10<h2 class="title"><a name="NAME">Name</a></h2>
11ippfind - find internet printing protocol printers
12<h2 class="title"><a name="SYNOPSIS">Synopsis</a></h2>
c277f98c
MS
13<b>ippfind</b>
14[
15<i>options</i>
bf1bc4c6
MS
16] <i>regtype</i>[<b>,</b><i>subtype</i>][<b>.</b><i>domain</i><b>.</b>] ... [
17<i>expression</i>
c277f98c
MS
18<b>ippfind</b>
19[
20<i>options</i>
21] name[.regtype[.domain.]] ... [
84987361 22<i>expression</i><i>...</i>
c277f98c
MS
23]
24<b>ippfind</b>
25--help
26<b>ippfind</b>
27--version
766a8229 28<h2 class="title"><a name="OPTIONS">Options</a></h2>
2909c66c
MS
29<dl class="man">
30<dt>--help
31<dd style="margin-left: 5.0em">Show program help
32<dt>--version
33<dd style="margin-left: 5.0em">Show program version
34<dt>-4
35<dd style="margin-left: 5.0em">Use IPv4 when listing
36<dt>-6
37<dd style="margin-left: 5.0em">Use IPv6 when listing
38<dt>-T seconds
39<dd style="margin-left: 5.0em">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.
40<dt>-V version
41<dd style="margin-left: 5.0em">Specifies the IPP version when listing. Supported values are 1.1, 2.0, 2.1, and 2.2.
766a8229 42
2909c66c 43</dl>
766a8229 44<h2 class="title"><a name="DESCRIPTION">Description</a></h2>
e5528d42 45<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:
2909c66c 46<pre class="man">
e5528d42
MS
47 ippfind --ls
48</pre>
49Similarly, to send a PostScript test page to every PostScript printer, run:
2909c66c 50<pre class="man">
e5528d42
MS
51 ippfind --txt-pdl application/postscript --exec ipptool \
52 -f onepage-letter.ps '{}' print-job.test \;
53</pre>
54
55<h2 class="title"><a name="REGISTRATION_TYPES">Registration Types</a></h2>
56<i>ippfind</i> supports the following registration types:
2909c66c
MS
57<dl class="man">
58<dt>_http._tcp
59<dd style="margin-left: 5.0em">HyperText Transport Protocol (HTTP, RFC 2616)
60<dt>_https._tcp
61<dd style="margin-left: 5.0em">Secure HyperText Transport Protocol (HTTPS, RFC 2818)
62<dt>_ipp._tcp
63<dd style="margin-left: 5.0em">Internet Printing Protocol (IPP, RFC 2911)
64<dt>_ipps._tcp
65<dd style="margin-left: 5.0em">Secure Internet Printing Protocol (IPPS, draft)
66<dt>_printer._tcp
67<dd style="margin-left: 5.0em">Line Printer Daemon (LPD, RFC 1179)
766a8229 68
2909c66c 69</dl>
766a8229 70<h2 class="title"><a name="EXPRESSIONS">Expressions</a></h2>
e5528d42 71<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:
2909c66c
MS
72<dl class="man">
73<dt>-d regex
74<dd style="margin-left: 5.0em"><dt>--domain regex
75<dd style="margin-left: 5.0em">True if the domain matches the given regular expression.
76<dt>--false
77<dd style="margin-left: 5.0em">Always false.
78<dt>-h regex
79<dd style="margin-left: 5.0em"><dt>--host regex
80<dd style="margin-left: 5.0em">True is the hostname matches the given regular expression.
81<dt>-l
82<dd style="margin-left: 5.0em"><dt>--ls
83<dd style="margin-left: 5.0em">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.
84<dt>--local
85<dd style="margin-left: 5.0em">True if the service is local to this computer.
86<dt>-n regex
87<dd style="margin-left: 5.0em"><dt>--name regex
88<dd style="margin-left: 5.0em">True if the service instance name matches the given regular expression.
89<dt>--path regex
90<dd style="margin-left: 5.0em">True if the URI resource path matches the given regular expression.
91<dt>-P number[-number]
92<dd style="margin-left: 5.0em"><dt>--port number[-number]
93<dd style="margin-left: 5.0em">True if the port matches the given number or range.
94<dt>-p
95<dd style="margin-left: 5.0em"><dt>--print
96<dd style="margin-left: 5.0em">Prints the URI if the result of previous expressions is true. The result is always true.
97<dt>-q
98<dd style="margin-left: 5.0em"><dt>--quiet
99<dd style="margin-left: 5.0em">Quiet mode - just returns the exit codes below.
100<dt>-r
101<dd style="margin-left: 5.0em"><dt>--remote
102<dd style="margin-left: 5.0em">True if the service is not local to this computer.
103<dt>-s
104<dd style="margin-left: 5.0em"><dt>--print-name
105<dd style="margin-left: 5.0em">Prints the service instance name if the result of previous expressions is true. The result is always true.
106<dt>--true
107<dd style="margin-left: 5.0em">Always true.
108<dt>-t key
109<dd style="margin-left: 5.0em"><dt>--txt key
110<dd style="margin-left: 5.0em">True if the TXT record contains the named key.
111<dt>--txt-<i>key</i> regex
112<dd style="margin-left: 5.0em">True if the TXT record contains the named key and matches the given regular
766a8229 113expression.
2909c66c
MS
114<dt>-u regex
115<dd style="margin-left: 5.0em"><dt>--uri regex
116<dd style="margin-left: 5.0em">True if the URI matches the given regular expression.
117<dt>-x utility [argument ...] ;
118<dd style="margin-left: 5.0em"><dt>--exec utility [argument ...] ;
119<dd style="margin-left: 5.0em">Executes the specified program if the current result is true. "{foo}" arguments are replaced with the corresponding value - see SUBSTITUTIONS below.
120</dl>
766a8229 121<p>Expressions may also contain modifiers:
2909c66c
MS
122<dl class="man">
123<dt>( expression )
124<dd style="margin-left: 5.0em">Group the result of expressions.
125<dt>! expression
126<dd style="margin-left: 5.0em"><dt>--not expression
127<dd style="margin-left: 5.0em">Unary NOT of the expression.
128<dt>expression expression
129<dd style="margin-left: 5.0em"><dt>expression --and expression
130<dd style="margin-left: 5.0em">Logical AND of expressions.
131<dt>expression --or expression
132<dd style="margin-left: 5.0em">Logical OR of expressions.
766a8229 133
2909c66c 134</dl>
766a8229
MS
135<h2 class="title"><a name="SUBSTITUTIONS">Substitutions</a></h2>
136The substitutions for "{foo}" in -e and --exec are:
2909c66c
MS
137<dl class="man">
138<dt>{}
139<dd style="margin-left: 5.0em">URI
140<dt>{service_domain}
141<dd style="margin-left: 5.0em">Domain name, e.g., "example.com.", "local.", etc.
142<dt>{service_hostname}
143<dd style="margin-left: 5.0em">Fully-qualified domain name, e.g., "printer.example.com.", "printer.local.", etc.
144<dt>{service_name}
145<dd style="margin-left: 5.0em">Service instance name, e.g., "My Fine Printer".
146<dt>{service_port}
147<dd style="margin-left: 5.0em">Port number for server, typically 631 for IPP and 80 for HTTP.
148<dt>{service_regtype}
149<dd style="margin-left: 5.0em">DNS-SD registration type, e.g., "_ipp._tcp", "_http._tcp", etc.
150<dt>{service_scheme}
151<dd style="margin-left: 5.0em">URI scheme for DNS-SD registration type, e.g., "ipp", "http", etc.
152<dt>{service_uri}
153<dd style="margin-left: 5.0em">URI for service, e.g., "ipp://printer.local./ipp/print", "<a href="http://printer.local./"">http://printer.local./"</a>, etc.
154<dt>{txt_<i>key</i>}
155<dd style="margin-left: 5.0em">Value of TXT record <i>key</i> (lowercase).
766a8229 156
2909c66c 157</dl>
766a8229
MS
158<h2 class="title"><a name="ENVIRONMENT_VARIABLES">Environment Variables</a></h2>
159When executing a program, <i>ippfind</i> sets the following environment variables for the matching service registration:
2909c66c
MS
160<dl class="man">
161<dt>IPPFIND_SERVICE_DOMAIN
162<dd style="margin-left: 5.0em">Domain name, e.g., "example.com.", "local.", etc.
163<dt>IPPFIND_SERVICE_HOSTNAME
164<dd style="margin-left: 5.0em">Fully-qualified domain name, e.g., "printer.example.com.", "printer.local.", etc.
165<dt>IPPFIND_SERVICE_NAME
166<dd style="margin-left: 5.0em">Service instance name, e.g., "My Fine Printer".
167<dt>IPPFIND_SERVICE_PORT
168<dd style="margin-left: 5.0em">Port number for server, typically 631 for IPP and 80 for HTTP.
169<dt>IPPFIND_SERVICE_REGTYPE
170<dd style="margin-left: 5.0em">DNS-SD registration type, e.g., "_ipp._tcp", "_http._tcp", etc.
171<dt>IPPFIND_SERVICE_SCHEME
172<dd style="margin-left: 5.0em">URI scheme for DNS-SD registration type, e.g., "ipp", "http", etc.
173<dt>IPPFIND_SERVICE_URI
174<dd style="margin-left: 5.0em">URI for service, e.g., "ipp://printer.local./ipp/print", "<a href="http://printer.local./"">http://printer.local./"</a>, etc.
175<dt>IPPFIND_TXT_<i>KEY</i>
176<dd style="margin-left: 5.0em">Values of TXT record <i>KEY</i> (uppercase).
766a8229 177
2909c66c 178</dl>
766a8229
MS
179<h2 class="title"><a name="EXIT_CODES">Exit Codes</a></h2>
180<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.
181
182<h2 class="title"><a name="SEE_ALSO">See Also</a></h2>
c277f98c 183<i>ipptool(1)</i>
766a8229
MS
184
185<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
186Copyright 2013 by Apple Inc.
187
188</body>
189</html>