]> git.ipfire.org Git - thirdparty/cups.git/blame - man/ippfind.man
Support face-up printers (Issue #5345)
[thirdparty/cups.git] / man / ippfind.man
CommitLineData
766a8229 1.\"
bf1bc4c6 2.\" ippfind man page for CUPS.
766a8229 3.\"
566d5c70 4.\" Copyright © 2013-2018 by Apple Inc.
766a8229 5.\"
bf1bc4c6
MS
6.\" These coded instructions, statements, and computer programs are the
7.\" property of Apple Inc. and are protected by Federal copyright
8.\" law. Distribution and use rights are outlined in the file "LICENSE.txt"
9.\" which should have been included with this file. If this file is
10.\" file is missing or damaged, see the license at "http://www.cups.org/".
766a8229 11.\"
566d5c70 12.TH ippfind 1 "CUPS" "14 February 2018" "Apple Inc."
766a8229 13.SH NAME
bf1bc4c6 14ippfind \- find internet printing protocol printers
766a8229
MS
15.SH SYNOPSIS
16.B ippfind
17[
18.I options
bf1bc4c6
MS
19] \fIregtype\fR[\fB,\fIsubtype\fR][\fB.\fIdomain\fB.\fR] ... [
20.I expression
0d1da748
MS
21 ... ]
22.br
766a8229
MS
23.B ippfind
24[
25.I options
0d1da748
MS
26] \fIname\fR[\fB.\fIregtype\fR[\fB.\fIdomain\fB.\fR]] ... [
27.I expression
28 ... ]
29.br
766a8229 30.B ippfind
0d1da748
MS
31.B \-\-help
32.br
766a8229 33.B ippfind
0d1da748 34.B \-\-version
766a8229 35.SH DESCRIPTION
0d1da748
MS
36\fBippfind\fR finds services registered with a DNS server or available through local devices.
37Its primary purpose is to find IPP printers and show their URIs, show their current status, or run commands.
38.SS REGISTRATION TYPES
39\fBippfind\fR supports the following registration types:
e5528d42
MS
40.TP 5
41_http._tcp
42HyperText Transport Protocol (HTTP, RFC 2616)
43.TP 5
44_https._tcp
45Secure HyperText Transport Protocol (HTTPS, RFC 2818)
46.TP 5
47_ipp._tcp
48Internet Printing Protocol (IPP, RFC 2911)
49.TP 5
50_ipps._tcp
51Secure Internet Printing Protocol (IPPS, draft)
52.TP 5
53_printer._tcp
54Line Printer Daemon (LPD, RFC 1179)
0d1da748
MS
55.SS EXPRESSIONS
56\fBippfind\fR supports expressions much like the
57.BR find (1)
58utility.
59However, unlike
60.BR find (1),
61\fBippfind\fR uses POSIX regular expressions instead of shell filename matching patterns.
62If \fI\-\-exec\fR, \fI\-l\fR, \fI\-\-ls\fR, \fI\-p\fR, \fI\-\-print\fR, \fI\-\-print\-name\fR, \fI\-q\fR, \fI\-\-quiet\fR, \fI\-s\fR, or \fI\-x\fR is not specified, \fBippfind\fR adds \fI\-\-print\fR to print the service URI of anything it finds.
63The following expressions are supported:
64.TP 5
65\fB\-d \fIregex\fR
66.TP 5
67\fB\-\-domain \fIregex\fR
766a8229
MS
68True if the domain matches the given regular expression.
69.TP 5
0d1da748 70.B \-\-false
766a8229
MS
71Always false.
72.TP 5
0d1da748 73\fB\-h \fIregex\fR
41743200 74.TP 5
0d1da748 75\fB\-\-host \fIregex\fR
41743200
MS
76True is the hostname matches the given regular expression.
77.TP 5
0d1da748 78.B \-l
766a8229 79.TP 5
0d1da748
MS
80.B \-\-ls
81Lists attributes returned by Get-Printer-Attributes for IPP printers and traditional \fIfind\fR "-ls" output for HTTP URLs.
82The result is true if the URI is accessible, false otherwise.
766a8229 83.TP 5
0d1da748 84.B \-\-local
766a8229
MS
85True if the service is local to this computer.
86.TP 5
566d5c70
MS
87\fB\-N \fIname\fR
88.TP 5
89\fB\-\-literal\-name \fIname\fR
90True if the service instance name matches the given name.
91.TP 5
0d1da748 92\fB\-n \fIregex\fR
766a8229 93.TP 5
0d1da748 94\fB\-\-name \fIregex\fR
766a8229
MS
95True if the service instance name matches the given regular expression.
96.TP 5
0d1da748 97\fB\-\-path \fIregex\fR
766a8229
MS
98True if the URI resource path matches the given regular expression.
99.TP 5
0d1da748 100\fB\-P \fInumber\fR[\fB-\fInumber\fR]
41743200 101.TP 5
0d1da748 102\fB\-\-port \fInumber\fR[\fB-\fInumber\fR]
41743200
MS
103True if the port matches the given number or range.
104.TP 5
0d1da748 105.B \-p
766a8229 106.TP 5
0d1da748
MS
107.B \-\-print
108Prints the URI if the result of previous expressions is true.
109The result is always true.
766a8229 110.TP 5
0d1da748 111.B \-q
766a8229 112.TP 5
0d1da748 113.B \-\-quiet
766a8229
MS
114Quiet mode - just returns the exit codes below.
115.TP 5
0d1da748 116.B \-r
766a8229 117.TP 5
0d1da748 118.B \-\-remote
766a8229
MS
119True if the service is not local to this computer.
120.TP 5
0d1da748 121.B \-s
766a8229 122.TP 5
0d1da748
MS
123.B \-\-print\-name
124Prints the service instance name if the result of previous expressions is true.
125The result is always true.
766a8229 126.TP 5
0d1da748 127.B \-\-true
766a8229
MS
128Always true.
129.TP 5
0d1da748 130\fB\-t \fIkey\fR
766a8229 131.TP 5
0d1da748 132\fB\-\-txt \fIkey\fR
766a8229
MS
133True if the TXT record contains the named key.
134.TP 5
0d1da748
MS
135\fB\-\-txt\-\fIkey regex\fR
136True if the TXT record contains the named key and matches the given regular expression.
766a8229 137.TP 5
0d1da748 138\fB\-u \fIregex\fR
766a8229 139.TP 5
0d1da748 140\fB\-\-uri \fIregex\fR
766a8229 141True if the URI matches the given regular expression.
e5528d42 142.TP 5
0d1da748 143\fB\-x \fIutility \fR[ \fIargument \fR... ] \fB;\fR
e5528d42 144.TP 5
0d1da748
MS
145\fB\-\-exec \fIutility \fR[ \fIargument \fR... ] \fB;\fR
146Executes the specified program if the current result is true.
147"{foo}" arguments are replaced with the corresponding value - see SUBSTITUTIONS below.
766a8229
MS
148.PP
149Expressions may also contain modifiers:
150.TP 5
0d1da748 151\fB( \fIexpression \fB)\fR
766a8229
MS
152Group the result of expressions.
153.TP 5
0d1da748 154\fB! \fIexpression\fR
766a8229 155.TP 5
0d1da748 156\fB\-\-not \fIexpression\fR
766a8229
MS
157Unary NOT of the expression.
158.TP 5
0d1da748 159\fIexpression expression\fR
766a8229 160.TP 5
0d1da748 161\fIexpression \fB\-\-and \fIexpression\fR
766a8229
MS
162Logical AND of expressions.
163.TP 5
0d1da748 164\fIexpression \fB\-\-or \fIexpression\fR
766a8229 165Logical OR of expressions.
0d1da748
MS
166.SS SUBSTITUTIONS
167The substitutions for "{foo}" in \fI\-e\fR and \fI\-\-exec\fR are:
766a8229 168.TP 5
0d1da748 169.B {service_domain}
766a8229
MS
170Domain name, e.g., "example.com.", "local.", etc.
171.TP 5
0d1da748 172.B {service_hostname}
766a8229
MS
173Fully-qualified domain name, e.g., "printer.example.com.", "printer.local.", etc.
174.TP 5
0d1da748 175.B {service_name}
766a8229
MS
176Service instance name, e.g., "My Fine Printer".
177.TP 5
0d1da748 178.B {service_port}
766a8229
MS
179Port number for server, typically 631 for IPP and 80 for HTTP.
180.TP 5
0d1da748 181.B {service_regtype}
766a8229
MS
182DNS-SD registration type, e.g., "_ipp._tcp", "_http._tcp", etc.
183.TP 5
0d1da748 184.B {service_scheme}
766a8229
MS
185URI scheme for DNS-SD registration type, e.g., "ipp", "http", etc.
186.TP 5
0d1da748
MS
187.B {}
188.TP 5
189.B {service_uri}
766a8229
MS
190URI for service, e.g., "ipp://printer.local./ipp/print", "http://printer.local./", etc.
191.TP 5
0d1da748 192\fB{txt_\fIkey\fB}\fR
766a8229 193Value of TXT record \fIkey\fR (lowercase).
0d1da748 194.SH OPTIONS
52f7b14a 195\fBippfind\fR supports the following options:
0d1da748
MS
196.TP 5
197.B \-\-help
198Show program help.
199.TP 5
200.B \-\-version
201Show program version.
202.TP 5
203.B \-4
204Use IPv4 when listing.
205.TP 5
206.B \-6
207Use IPv6 when listing.
766a8229 208.TP 5
0d1da748
MS
209\fB\-T \fIseconds\fR
210Specify find timeout in seconds.
211If 1 or less, \fBippfind\fR stops as soon as it thinks it has found everything.
212The default timeout is 1 second.
213.TP 5
214\fB\-V \fIversion\fR
215Specifies the IPP version when listing.
216Supported values are "1.1", "2.0", "2.1", and "2.2".
217.SH EXIT STATUS
218\fBippfind\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.
219.SH ENVIRONMENT
220When executing a program, \fBippfind\fR sets the following environment variables for the matching service registration:
221.TP 5
222.B IPPFIND_SERVICE_DOMAIN
766a8229
MS
223Domain name, e.g., "example.com.", "local.", etc.
224.TP 5
0d1da748 225.B IPPFIND_SERVICE_HOSTNAME
766a8229
MS
226Fully-qualified domain name, e.g., "printer.example.com.", "printer.local.", etc.
227.TP 5
0d1da748 228.B IPPFIND_SERVICE_NAME
766a8229
MS
229Service instance name, e.g., "My Fine Printer".
230.TP 5
0d1da748 231.B IPPFIND_SERVICE_PORT
766a8229
MS
232Port number for server, typically 631 for IPP and 80 for HTTP.
233.TP 5
0d1da748 234.B IPPFIND_SERVICE_REGTYPE
766a8229
MS
235DNS-SD registration type, e.g., "_ipp._tcp", "_http._tcp", etc.
236.TP 5
0d1da748 237.B IPPFIND_SERVICE_SCHEME
766a8229
MS
238URI scheme for DNS-SD registration type, e.g., "ipp", "http", etc.
239.TP 5
0d1da748 240.B IPPFIND_SERVICE_URI
766a8229
MS
241URI for service, e.g., "ipp://printer.local./ipp/print", "http://printer.local./", etc.
242.TP 5
0d1da748 243.B IPPFIND_TXT_\fIKEY\fR
766a8229 244Values of TXT record \fIKEY\fR (uppercase).
0d1da748
MS
245.SH EXAMPLES
246To show the status of all registered IPP printers on your network, run:
247.nf
766a8229 248
0d1da748 249 ippfind \-\-ls
766a8229 250
0d1da748
MS
251.fi
252Similarly, to send a PostScript test page to every PostScript printer, run:
253.nf
766a8229 254
0d1da748
MS
255 ippfind \-\-txt\-pdl application/postscript \-\-exec ipptool
256 \-f onepage\-letter.ps '{}' print\-job.test \\;
257.fi
258.SH SEE ALSO
259.BR ipptool (1)
766a8229 260.SH COPYRIGHT
566d5c70 261Copyright \[co] 2013-2018 by Apple Inc.