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