# ippfind

## NAME



           ippfind - find internet printing protocol printers
    


## SYNOPSIS



           **ippfind**[ _options_ ] _regtype_[**,**_subtype_][**.**_domain_**.**] ... [ _expression_
            ... ]
           **ippfind**[ _options_ ] _name_[**.**_regtype_[**.**_domain_**.**]] ... [ _expression_
            ... ]
           **ippfind --help**
           **ippfind --version**
    


## DESCRIPTION



           **ippfind** 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.
    
       **REGISTRATION TYPES**
           **ippfind** supports the following registration types:
    
           _http._tcp
                HyperText Transport Protocol (HTTP, RFC 2616)
    
           _https._tcp
                Secure HyperText Transport Protocol (HTTPS, RFC 2818)
    
           _ipp._tcp
                Internet Printing Protocol (IPP, RFC 2911)
    
           _ipps._tcp
                Secure Internet Printing Protocol (IPPS, draft)
    
           _printer._tcp
                Line Printer Daemon (LPD, RFC 1179)
    
       **EXPRESSIONS**
           **ippfind** supports expressions much like the find(1) utility.
           However, unlike find(1), **ippfind** 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, **ippfind** adds _--print_ to print the service URI of
           anything it finds.  The following expressions are supported:
    
           **-d** _regex_
    
           **--domain** _regex_
                True if the domain matches the given regular expression.
    
           **--false**
                Always false.
    
           **-h** _regex_
    
           **--host** _regex_
                True is the hostname matches the given regular expression.
    
           **-l**
    
           **--ls** Lists attributes returned by Get-Printer-Attributes for IPP
                printers and traditional _find_ "-ls" output for HTTP URLs.
                The result is true if the URI is accessible, false otherwise.
    
           **--local**
                True if the service is local to this computer.
    
           **-N** _name_
    
           **--literal-name** _name_
                True if the service instance name matches the given name.
    
           **-n** _regex_
    
           **--name** _regex_
                True if the service instance name matches the given regular
                expression.
    
           **--path** _regex_
                True if the URI resource path matches the given regular
                expression.
    
           **-P** _number_[**-**_number_]
    
           **--port** _number_[**-**_number_]
                True if the port matches the given number or range.
    
           **-p**
    
           **--print**
                Prints the URI if the result of previous expressions is true.
                The result is always true.
    
           **-q**
    
           **--quiet**
                Quiet mode - just returns the exit codes below.
    
           **-r**
    
           **--remote**
                True if the service is not local to this computer.
    
           **-s**
    
           **--print-name**
                Prints the service instance name if the result of previous
                expressions is true.  The result is always true.
    
           **--true**
                Always true.
    
           **-t** _key_
    
           **--txt** _key_
                True if the TXT record contains the named key.
    
           **--txt-**_key regex_
                True if the TXT record contains the named key and matches the
                given regular expression.
    
           **-u** _regex_
    
           **--uri** _regex_
                True if the URI matches the given regular expression.
    
           **-x** _utility_ [ _argument_ ... ] **;**
    
           **--exec** _utility_ [ _argument_ ... ] **;**
                Executes the specified program if the current result is true.
                "{foo}" arguments are replaced with the corresponding value -
                see SUBSTITUTIONS below.
    
           Expressions may also contain modifiers:
    
           **(**_expression_ **)**
                Group the result of expressions.
    
           **!**_expression_
    
           **--not** _expression_
                Unary NOT of the expression.
    
           _expression expression_
    
           _expression_ **--and** _expression_
                Logical AND of expressions.
    
           _expression_ **--or** _expression_
                Logical OR of expressions.
    
       **SUBSTITUTIONS**
           The substitutions for "{foo}" in _-e_ and _--exec_ are:
    
           **{service_domain}**
                Domain name, e.g., "example.com.", "local.", etc.
    
           **{service_hostname}**
                Fully-qualified domain name, e.g., "printer.example.com.",
                "printer.local.", etc.
    
           **{service_name}**
                Service instance name, e.g., "My Fine Printer".
    
           **{service_port}**
                Port number for server, typically 631 for IPP and 80 for
                HTTP.
    
           **{service_regtype}**
                DNS-SD registration type, e.g., "_ipp._tcp", "_http._tcp",
                etc.
    
           **{service_scheme}**
                URI scheme for DNS-SD registration type, e.g., "ipp", "http",
                etc.
    
           **{}**
    
           **{service_uri}**
                URI for service, e.g., "ipp://printer.local./ipp/print",
                "http://printer.local./", etc.
    
           **{txt_**_key_**}**
                Value of TXT record _key_ (lowercase).
    


## OPTIONS



           **ippfind** supports the following options:
    
           **--help**
                Show program help.
    
           **--version**
                Show program version.
    
           **-4** Use IPv4 when listing.
    
           **-6** Use IPv6 when listing.
    
           **-T** _seconds_
                Specify find timeout in seconds.  If 1 or less, **ippfind** stops
                as soon as it thinks it has found everything.  The default
                timeout is 1 second.
    
           **-V** _version_
                Specifies the IPP version when listing.  Supported values are
                "1.1", "2.0", "2.1", and "2.2".
    


## EXIT STATUS



           **ippfind** 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.
    


## ENVIRONMENT



           When executing a program, **ippfind** sets the following environment
           variables for the matching service registration:
    
           **IPPFIND_SERVICE_DOMAIN**
                Domain name, e.g., "example.com.", "local.", etc.
    
           **IPPFIND_SERVICE_HOSTNAME**
                Fully-qualified domain name, e.g., "printer.example.com.",
                "printer.local.", etc.
    
           **IPPFIND_SERVICE_NAME**
                Service instance name, e.g., "My Fine Printer".
    
           **IPPFIND_SERVICE_PORT**
                Port number for server, typically 631 for IPP and 80 for
                HTTP.
    
           **IPPFIND_SERVICE_REGTYPE**
                DNS-SD registration type, e.g., "_ipp._tcp", "_http._tcp",
                etc.
    
           **IPPFIND_SERVICE_SCHEME**
                URI scheme for DNS-SD registration type, e.g., "ipp", "http",
                etc.
    
           **IPPFIND_SERVICE_URI**
                URI for service, e.g., "ipp://printer.local./ipp/print",
                "http://printer.local./", etc.
    
           **IPPFIND_TXT_**_KEY_
                Values of TXT record _KEY_ (uppercase).
    


## EXAMPLES



           To show the status of all registered IPP printers on your network,
           run:
    
               ippfind --ls
    
           Similarly, to send a PostScript test page to every PostScript
           printer, run:
    
               ippfind --txt-pdl application/postscript --exec ipptool
                 -f onepage-letter.ps '{}' print-job.test \;
    


* * *