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