Blame man/ippfind.man

Packit 2fc92b
.\"
Packit 2fc92b
.\" ippfind man page for CUPS.
Packit 2fc92b
.\"
Packit 2fc92b
.\" Copyright 2013-2014 by Apple Inc.
Packit 2fc92b
.\"
Packit 2fc92b
.\" These coded instructions, statements, and computer programs are the
Packit 2fc92b
.\" property of Apple Inc. and are protected by Federal copyright
Packit 2fc92b
.\" law.  Distribution and use rights are outlined in the file "LICENSE.txt"
Packit 2fc92b
.\" which should have been included with this file.  If this file is
Packit 2fc92b
.\" file is missing or damaged, see the license at "http://www.cups.org/".
Packit 2fc92b
.\"
Packit 2fc92b
.TH ippfind 1 "CUPS" "11 June 2014" "Apple Inc."
Packit 2fc92b
.SH NAME
Packit 2fc92b
ippfind \- find internet printing protocol printers
Packit 2fc92b
.SH SYNOPSIS
Packit 2fc92b
.B ippfind
Packit 2fc92b
[
Packit 2fc92b
.I options
Packit 2fc92b
] \fIregtype\fR[\fB,\fIsubtype\fR][\fB.\fIdomain\fB.\fR] ... [
Packit 2fc92b
.I expression
Packit 2fc92b
 ... ]
Packit 2fc92b
.br
Packit 2fc92b
.B ippfind
Packit 2fc92b
[
Packit 2fc92b
.I options
Packit 2fc92b
] \fIname\fR[\fB.\fIregtype\fR[\fB.\fIdomain\fB.\fR]] ... [
Packit 2fc92b
.I expression
Packit 2fc92b
 ... ]
Packit 2fc92b
.br
Packit 2fc92b
.B ippfind
Packit 2fc92b
.B \-\-help
Packit 2fc92b
.br
Packit 2fc92b
.B ippfind
Packit 2fc92b
.B \-\-version
Packit 2fc92b
.SH DESCRIPTION
Packit 2fc92b
\fBippfind\fR finds services registered with a DNS server or available through local devices.
Packit 2fc92b
Its primary purpose is to find IPP printers and show their URIs, show their current status, or run commands.
Packit 2fc92b
.SS REGISTRATION TYPES
Packit 2fc92b
\fBippfind\fR supports the following registration types:
Packit 2fc92b
.TP 5
Packit 2fc92b
_http._tcp
Packit 2fc92b
HyperText Transport Protocol (HTTP, RFC 2616)
Packit 2fc92b
.TP 5
Packit 2fc92b
_https._tcp
Packit 2fc92b
Secure HyperText Transport Protocol (HTTPS, RFC 2818)
Packit 2fc92b
.TP 5
Packit 2fc92b
_ipp._tcp
Packit 2fc92b
Internet Printing Protocol (IPP, RFC 2911)
Packit 2fc92b
.TP 5
Packit 2fc92b
_ipps._tcp
Packit 2fc92b
Secure Internet Printing Protocol (IPPS, draft)
Packit 2fc92b
.TP 5
Packit 2fc92b
_printer._tcp
Packit 2fc92b
Line Printer Daemon (LPD, RFC 1179)
Packit 2fc92b
.SS EXPRESSIONS
Packit 2fc92b
\fBippfind\fR supports expressions much like the
Packit 2fc92b
.BR find (1)
Packit 2fc92b
utility.
Packit 2fc92b
However, unlike
Packit 2fc92b
.BR find (1),
Packit 2fc92b
\fBippfind\fR uses POSIX regular expressions instead of shell filename matching patterns.
Packit 2fc92b
If \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.
Packit 2fc92b
The following expressions are supported:
Packit 2fc92b
.TP 5
Packit 2fc92b
\fB\-d \fIregex\fR
Packit 2fc92b
.TP 5
Packit 2fc92b
\fB\-\-domain \fIregex\fR
Packit 2fc92b
True if the domain matches the given regular expression.
Packit 2fc92b
.TP 5
Packit 2fc92b
.B \-\-false
Packit 2fc92b
Always false.
Packit 2fc92b
.TP 5
Packit 2fc92b
\fB\-h \fIregex\fR
Packit 2fc92b
.TP 5
Packit 2fc92b
\fB\-\-host \fIregex\fR
Packit 2fc92b
True is the hostname matches the given regular expression.
Packit 2fc92b
.TP 5
Packit 2fc92b
.B \-l
Packit 2fc92b
.TP 5
Packit 2fc92b
.B \-\-ls
Packit 2fc92b
Lists attributes returned by Get-Printer-Attributes for IPP printers and traditional \fIfind\fR "-ls" output for HTTP URLs.
Packit 2fc92b
The result is true if the URI is accessible, false otherwise.
Packit 2fc92b
.TP 5
Packit 2fc92b
.B \-\-local
Packit 2fc92b
True if the service is local to this computer.
Packit 2fc92b
.TP 5
Packit 2fc92b
\fB\-n \fIregex\fR
Packit 2fc92b
.TP 5
Packit 2fc92b
\fB\-\-name \fIregex\fR
Packit 2fc92b
True if the service instance name matches the given regular expression.
Packit 2fc92b
.TP 5
Packit 2fc92b
\fB\-\-path \fIregex\fR
Packit 2fc92b
True if the URI resource path matches the given regular expression.
Packit 2fc92b
.TP 5
Packit 2fc92b
\fB\-P \fInumber\fR[\fB-\fInumber\fR]
Packit 2fc92b
.TP 5
Packit 2fc92b
\fB\-\-port \fInumber\fR[\fB-\fInumber\fR]
Packit 2fc92b
True if the port matches the given number or range.
Packit 2fc92b
.TP 5
Packit 2fc92b
.B \-p
Packit 2fc92b
.TP 5
Packit 2fc92b
.B \-\-print
Packit 2fc92b
Prints the URI if the result of previous expressions is true.
Packit 2fc92b
The result is always true.
Packit 2fc92b
.TP 5
Packit 2fc92b
.B \-q
Packit 2fc92b
.TP 5
Packit 2fc92b
.B \-\-quiet
Packit 2fc92b
Quiet mode - just returns the exit codes below.
Packit 2fc92b
.TP 5
Packit 2fc92b
.B \-r
Packit 2fc92b
.TP 5
Packit 2fc92b
.B \-\-remote
Packit 2fc92b
True if the service is not local to this computer.
Packit 2fc92b
.TP 5
Packit 2fc92b
.B \-s
Packit 2fc92b
.TP 5
Packit 2fc92b
.B \-\-print\-name
Packit 2fc92b
Prints the service instance name if the result of previous expressions is true.
Packit 2fc92b
The result is always true.
Packit 2fc92b
.TP 5
Packit 2fc92b
.B \-\-true
Packit 2fc92b
Always true.
Packit 2fc92b
.TP 5
Packit 2fc92b
\fB\-t \fIkey\fR
Packit 2fc92b
.TP 5
Packit 2fc92b
\fB\-\-txt \fIkey\fR
Packit 2fc92b
True if the TXT record contains the named key.
Packit 2fc92b
.TP 5
Packit 2fc92b
\fB\-\-txt\-\fIkey regex\fR
Packit 2fc92b
True if the TXT record contains the named key and matches the given regular expression.
Packit 2fc92b
.TP 5
Packit 2fc92b
\fB\-u \fIregex\fR
Packit 2fc92b
.TP 5
Packit 2fc92b
\fB\-\-uri \fIregex\fR
Packit 2fc92b
True if the URI matches the given regular expression.
Packit 2fc92b
.TP 5
Packit 2fc92b
\fB\-x \fIutility \fR[ \fIargument \fR... ] \fB;\fR
Packit 2fc92b
.TP 5
Packit 2fc92b
\fB\-\-exec \fIutility \fR[ \fIargument \fR... ] \fB;\fR
Packit 2fc92b
Executes the specified program if the current result is true.
Packit 2fc92b
"{foo}" arguments are replaced with the corresponding value - see SUBSTITUTIONS below.
Packit 2fc92b
.PP
Packit 2fc92b
Expressions may also contain modifiers:
Packit 2fc92b
.TP 5
Packit 2fc92b
\fB( \fIexpression \fB)\fR
Packit 2fc92b
Group the result of expressions.
Packit 2fc92b
.TP 5
Packit 2fc92b
\fB! \fIexpression\fR
Packit 2fc92b
.TP 5
Packit 2fc92b
\fB\-\-not \fIexpression\fR
Packit 2fc92b
Unary NOT of the expression.
Packit 2fc92b
.TP 5
Packit 2fc92b
\fIexpression expression\fR
Packit 2fc92b
.TP 5
Packit 2fc92b
\fIexpression \fB\-\-and \fIexpression\fR
Packit 2fc92b
Logical AND of expressions.
Packit 2fc92b
.TP 5
Packit 2fc92b
\fIexpression \fB\-\-or \fIexpression\fR
Packit 2fc92b
Logical OR of expressions.
Packit 2fc92b
.SS SUBSTITUTIONS
Packit 2fc92b
The substitutions for "{foo}" in \fI\-e\fR and \fI\-\-exec\fR are:
Packit 2fc92b
.TP 5
Packit 2fc92b
.B {service_domain}
Packit 2fc92b
Domain name, e.g., "example.com.", "local.", etc.
Packit 2fc92b
.TP 5
Packit 2fc92b
.B {service_hostname}
Packit 2fc92b
Fully-qualified domain name, e.g., "printer.example.com.", "printer.local.", etc.
Packit 2fc92b
.TP 5
Packit 2fc92b
.B {service_name}
Packit 2fc92b
Service instance name, e.g., "My Fine Printer".
Packit 2fc92b
.TP 5
Packit 2fc92b
.B {service_port}
Packit 2fc92b
Port number for server, typically 631 for IPP and 80 for HTTP.
Packit 2fc92b
.TP 5
Packit 2fc92b
.B {service_regtype}
Packit 2fc92b
DNS-SD registration type, e.g., "_ipp._tcp", "_http._tcp", etc.
Packit 2fc92b
.TP 5
Packit 2fc92b
.B {service_scheme}
Packit 2fc92b
URI scheme for DNS-SD registration type, e.g., "ipp", "http", etc.
Packit 2fc92b
.TP 5
Packit 2fc92b
.B {}
Packit 2fc92b
.TP 5
Packit 2fc92b
.B {service_uri}
Packit 2fc92b
URI for service, e.g., "ipp://printer.local./ipp/print", "http://printer.local./", etc.
Packit 2fc92b
.TP 5
Packit 2fc92b
\fB{txt_\fIkey\fB}\fR
Packit 2fc92b
Value of TXT record \fIkey\fR (lowercase).
Packit 2fc92b
.SH OPTIONS
Packit 2fc92b
\fBippfind\fR supports the following options:
Packit 2fc92b
.TP 5
Packit 2fc92b
.B \-\-help
Packit 2fc92b
Show program help.
Packit 2fc92b
.TP 5
Packit 2fc92b
.B \-\-version
Packit 2fc92b
Show program version.
Packit 2fc92b
.TP 5
Packit 2fc92b
.B \-4
Packit 2fc92b
Use IPv4 when listing.
Packit 2fc92b
.TP 5
Packit 2fc92b
.B \-6
Packit 2fc92b
Use IPv6 when listing.
Packit 2fc92b
.TP 5
Packit 2fc92b
\fB\-T \fIseconds\fR
Packit 2fc92b
Specify find timeout in seconds.
Packit 2fc92b
If 1 or less, \fBippfind\fR stops as soon as it thinks it has found everything.
Packit 2fc92b
The default timeout is 1 second.
Packit 2fc92b
.TP 5
Packit 2fc92b
\fB\-V \fIversion\fR
Packit 2fc92b
Specifies the IPP version when listing.
Packit 2fc92b
Supported values are "1.1", "2.0", "2.1", and "2.2".
Packit 2fc92b
.SH EXIT STATUS
Packit 2fc92b
\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.
Packit 2fc92b
.SH ENVIRONMENT
Packit 2fc92b
When executing a program, \fBippfind\fR sets the following environment variables for the matching service registration:
Packit 2fc92b
.TP 5
Packit 2fc92b
.B IPPFIND_SERVICE_DOMAIN
Packit 2fc92b
Domain name, e.g., "example.com.", "local.", etc.
Packit 2fc92b
.TP 5
Packit 2fc92b
.B IPPFIND_SERVICE_HOSTNAME
Packit 2fc92b
Fully-qualified domain name, e.g., "printer.example.com.", "printer.local.", etc.
Packit 2fc92b
.TP 5
Packit 2fc92b
.B IPPFIND_SERVICE_NAME
Packit 2fc92b
Service instance name, e.g., "My Fine Printer".
Packit 2fc92b
.TP 5
Packit 2fc92b
.B IPPFIND_SERVICE_PORT
Packit 2fc92b
Port number for server, typically 631 for IPP and 80 for HTTP.
Packit 2fc92b
.TP 5
Packit 2fc92b
.B IPPFIND_SERVICE_REGTYPE
Packit 2fc92b
DNS-SD registration type, e.g., "_ipp._tcp", "_http._tcp", etc.
Packit 2fc92b
.TP 5
Packit 2fc92b
.B IPPFIND_SERVICE_SCHEME
Packit 2fc92b
URI scheme for DNS-SD registration type, e.g., "ipp", "http", etc.
Packit 2fc92b
.TP 5
Packit 2fc92b
.B IPPFIND_SERVICE_URI
Packit 2fc92b
URI for service, e.g., "ipp://printer.local./ipp/print", "http://printer.local./", etc.
Packit 2fc92b
.TP 5
Packit 2fc92b
.B IPPFIND_TXT_\fIKEY\fR
Packit 2fc92b
Values of TXT record \fIKEY\fR (uppercase).
Packit 2fc92b
.SH EXAMPLES
Packit 2fc92b
To show the status of all registered IPP printers on your network, run:
Packit 2fc92b
.nf
Packit 2fc92b
Packit 2fc92b
    ippfind \-\-ls
Packit 2fc92b
Packit 2fc92b
.fi
Packit 2fc92b
Similarly, to send a PostScript test page to every PostScript printer, run:
Packit 2fc92b
.nf
Packit 2fc92b
Packit 2fc92b
    ippfind \-\-txt\-pdl application/postscript \-\-exec ipptool
Packit 2fc92b
      \-f onepage\-letter.ps '{}' print\-job.test \\;
Packit 2fc92b
.fi
Packit 2fc92b
.SH SEE ALSO
Packit 2fc92b
.BR ipptool (1)
Packit 2fc92b
.SH COPYRIGHT
Packit 2fc92b
Copyright \[co] 2013-2015 by Apple Inc.