]> git.ipfire.org Git - thirdparty/cups.git/blame - man/ippfind.man
More man page updates.
[thirdparty/cups.git] / man / ippfind.man
CommitLineData
766a8229
MS
1.\"
2.\" "$Id$"
3.\"
bf1bc4c6 4.\" ippfind man page for CUPS.
766a8229 5.\"
bf1bc4c6 6.\" Copyright 2013-2014 by Apple Inc.
766a8229 7.\"
bf1bc4c6
MS
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/".
766a8229 13.\"
bf1bc4c6 14.TH ippfind 1 "CUPS" "11 June 2014" "Apple Inc."
766a8229 15.SH NAME
bf1bc4c6 16ippfind \- find internet printing protocol printers
766a8229
MS
17.SH SYNOPSIS
18.B ippfind
19[
20.I options
bf1bc4c6
MS
21] \fIregtype\fR[\fB,\fIsubtype\fR][\fB.\fIdomain\fB.\fR] ... [
22.I expression
23... ]
766a8229
MS
24.B ippfind
25[
26.I options
27] name[.regtype[.domain.]] ... [
28.I expression ...
29]
30.B ippfind
31--help
32.B ippfind
33--version
766a8229
MS
34.SH OPTIONS
35.TP 5
36--help
37Show program help
38.TP 5
39--version
40Show program version
41.TP 5
42-4
43Use IPv4 when listing
44.TP 5
45-6
46Use IPv6 when listing
47.TP 5
48-T seconds
49Specify 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.
50.TP 5
51-V version
52Specifies the IPP version when listing. Supported values are 1.1, 2.0, 2.1, and 2.2.
53
54.SH DESCRIPTION
e5528d42
MS
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:
56.nf
57 ippfind --ls
58.fi
59Similarly, to send a PostScript test page to every PostScript printer, run:
60.nf
61 ippfind --txt-pdl application/postscript --exec ipptool \\
62 -f onepage-letter.ps '{}' print-job.test \\;
63.fi
64
65.SH REGISTRATION TYPES
66\fIippfind\fR supports the following registration types:
67.TP 5
68_http._tcp
69HyperText Transport Protocol (HTTP, RFC 2616)
70.TP 5
71_https._tcp
72Secure HyperText Transport Protocol (HTTPS, RFC 2818)
73.TP 5
74_ipp._tcp
75Internet Printing Protocol (IPP, RFC 2911)
76.TP 5
77_ipps._tcp
78Secure Internet Printing Protocol (IPPS, draft)
79.TP 5
80_printer._tcp
81Line Printer Daemon (LPD, RFC 1179)
766a8229
MS
82
83.SH EXPRESSIONS
e5528d42 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:
766a8229
MS
85.TP 5
86-d regex
87.TP 5
88--domain regex
89True if the domain matches the given regular expression.
90.TP 5
766a8229
MS
91--false
92Always false.
93.TP 5
41743200
MS
94-h regex
95.TP 5
96--host regex
97True is the hostname matches the given regular expression.
98.TP 5
766a8229
MS
99-l
100.TP 5
101--ls
102Lists 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.
103.TP 5
104--local
105True if the service is local to this computer.
106.TP 5
107-n regex
108.TP 5
109--name regex
110True if the service instance name matches the given regular expression.
111.TP 5
112--path regex
113True if the URI resource path matches the given regular expression.
114.TP 5
41743200
MS
115-P number[-number]
116.TP 5
117--port number[-number]
118True if the port matches the given number or range.
119.TP 5
766a8229
MS
120-p
121.TP 5
122--print
123Prints the URI if the result of previous expressions is true. The result is always true.
124.TP 5
125-q
126.TP 5
127--quiet
128Quiet mode - just returns the exit codes below.
129.TP 5
130-r
131.TP 5
132--remote
133True if the service is not local to this computer.
134.TP 5
135-s
136.TP 5
137--print-name
138Prints the service instance name if the result of previous expressions is true. The result is always true.
139.TP 5
140--true
141Always true.
142.TP 5
143-t key
144.TP 5
145--txt key
146True if the TXT record contains the named key.
147.TP 5
148--txt-\fIkey\fR regex
149True if the TXT record contains the named key and matches the given regular
150expression.
151.TP 5
152-u regex
153.TP 5
154--uri regex
155True if the URI matches the given regular expression.
e5528d42
MS
156.TP 5
157-x utility [argument ...] ;
158.TP 5
159--exec utility [argument ...] ;
160Executes the specified program if the current result is true. "{foo}" arguments are replaced with the corresponding value - see SUBSTITUTIONS below.
766a8229
MS
161.PP
162Expressions may also contain modifiers:
163.TP 5
164( expression )
165Group the result of expressions.
166.TP 5
167! expression
168.TP 5
169--not expression
170Unary NOT of the expression.
171.TP 5
172expression expression
173.TP 5
174expression --and expression
175Logical AND of expressions.
176.TP 5
177expression --or expression
178Logical OR of expressions.
179
180.SH SUBSTITUTIONS
181The substitutions for "{foo}" in -e and --exec are:
182.TP 5
183{}
184URI
185.TP 5
186{service_domain}
187Domain name, e.g., "example.com.", "local.", etc.
188.TP 5
189{service_hostname}
190Fully-qualified domain name, e.g., "printer.example.com.", "printer.local.", etc.
191.TP 5
192{service_name}
193Service instance name, e.g., "My Fine Printer".
194.TP 5
195{service_port}
196Port number for server, typically 631 for IPP and 80 for HTTP.
197.TP 5
198{service_regtype}
199DNS-SD registration type, e.g., "_ipp._tcp", "_http._tcp", etc.
200.TP 5
201{service_scheme}
202URI scheme for DNS-SD registration type, e.g., "ipp", "http", etc.
203.TP 5
204{service_uri}
205URI for service, e.g., "ipp://printer.local./ipp/print", "http://printer.local./", etc.
206.TP 5
207{txt_\fIkey\fR}
208Value of TXT record \fIkey\fR (lowercase).
209
210.SH ENVIRONMENT VARIABLES
211When executing a program, \fIippfind\fR sets the following environment variables for the matching service registration:
212.TP 5
213IPPFIND_SERVICE_DOMAIN
214Domain name, e.g., "example.com.", "local.", etc.
215.TP 5
216IPPFIND_SERVICE_HOSTNAME
217Fully-qualified domain name, e.g., "printer.example.com.", "printer.local.", etc.
218.TP 5
219IPPFIND_SERVICE_NAME
220Service instance name, e.g., "My Fine Printer".
221.TP 5
222IPPFIND_SERVICE_PORT
223Port number for server, typically 631 for IPP and 80 for HTTP.
224.TP 5
225IPPFIND_SERVICE_REGTYPE
226DNS-SD registration type, e.g., "_ipp._tcp", "_http._tcp", etc.
227.TP 5
228IPPFIND_SERVICE_SCHEME
229URI scheme for DNS-SD registration type, e.g., "ipp", "http", etc.
230.TP 5
231IPPFIND_SERVICE_URI
232URI for service, e.g., "ipp://printer.local./ipp/print", "http://printer.local./", etc.
233.TP 5
234IPPFIND_TXT_\fIKEY\fR
235Values of TXT record \fIKEY\fR (uppercase).
236
237.SH EXIT CODES
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.
239
240.SH SEE ALSO
241\fIipptool(1)\fR
242
243.SH COPYRIGHT
244Copyright 2013 by Apple Inc.
245.\"
246.\" End of "$Id$".
247.\"