ippfind(1) OpenPrinting ippfind(1)

# [NAME](#NAME)

ippfind - find internet printing protocol printers

# [SYNOPSIS](#SYNOPSIS)

**ippfind** \[ *options* ] *regtype*\[**,subtype**]\[**.domain.**] ... [ *expression*  
... ]  
**ippfind** \[ *options* ] *name*\[**.regtype**\[**.domain.**]] ... [ *expression*  
... ]  
**ippfind** **--help**  
**ippfind** **--version**

# [DESCRIPTION](#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](#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](#EXPRESSIONS)

**ippfind** supports expressions much like the [**find**(1)](/man/os/cups/find.1) utility. However, unlike [**find**(1)](/man/os/cups/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**](#d)

[**--domain regex**](#domain)

True if the domain matches the given regular expression.

[**--false**](#false)

Always false.

[**-h regex**](#h)

[**--host regex**](#host)

True is the hostname matches the given regular expression.

[**-l**](#l)

[**--ls**](#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**](#local)

True if the service is local to this computer.

[**-N name**](#N)

[**--literal-name name**](#literal)

True if the service instance name matches the given name.

[**-n regex**](#n)

[**--name regex**](#name)

True if the service instance name matches the given regular expression.

[**--path regex**](#path)

True if the URI resource path matches the given regular expression.

[**-P number**\[**-number**\]](#P)

[**--port number**\[**-number**\]](#port)

True if the port matches the given number or range.

[**-p**](#p)

[**--print**](#print)

Prints the URI if the result of previous expressions is true. The result is always true.

[**-q**](#q)

[**--quiet**](#quiet)

Quiet mode - just returns the exit codes below.

[**-r**](#r)

[**--remote**](#remote)

True if the service is not local to this computer.

[**-s**](#s)

**--print-name**

Prints the service instance name if the result of previous expressions is true. The result is always true.

[**--true**](#true)

Always true.

[**-t key**](#t)

[**--txt key**](#txt)

True if the TXT record contains the named key.

[**--txt-key regex**](#txt~2)

True if the TXT record contains the named key and matches the given regular expression.

[**-u regex**](#u)

[**--uri regex**](#uri)

True if the URI matches the given regular expression.

[**-x utility** \[ *argument* ... \] **;**](#x)

[**--exec utility** \[ *argument* ... \] **;**](#exec)

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**](#not)

Unary NOT of the expression.

[*expression expression*](#expression)

[*expression --and expression*](#expression~2)

Logical AND of expressions.

[*expression --or expression*](#expression~3)

Logical OR of expressions.

## [SUBSTITUTIONS](#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](#OPTIONS)

**ippfind** supports the following options:

[**--help**](#help)

Show program help.

[**--version**](#version)

Show program version.

**-4**

Use IPv4 when listing.

**-6**

Use IPv6 when listing.

[**-T seconds**](#T)

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**](#V)

Specifies the IPP version when listing. Supported values are "1.1", "2.0", "2.1", and "2.2".

# [EXIT STATUS](#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](#ENVIRONMENT)

When executing a program, **ippfind** sets the following environment variables for the matching service registration:

[**IPPFIND\_SERVICE\_DOMAIN**](#IPPFIND_SERVICE_DOMAIN)

Domain name, e.g., "example.com.", "local.", etc.

[**IPPFIND\_SERVICE\_HOSTNAME**](#IPPFIND_SERVICE_HOSTNAME)

Fully-qualified domain name, e.g., "printer.example.com.", "printer.local.", etc.

[**IPPFIND\_SERVICE\_NAME**](#IPPFIND_SERVICE_NAME)

Service instance name, e.g., "My Fine Printer".

[**IPPFIND\_SERVICE\_PORT**](#IPPFIND_SERVICE_PORT)

Port number for server, typically 631 for IPP and 80 for HTTP.

[**IPPFIND\_SERVICE\_REGTYPE**](#IPPFIND_SERVICE_REGTYPE)

DNS-SD registration type, e.g., "\_ipp.\_tcp", "\_http.\_tcp", etc.

[**IPPFIND\_SERVICE\_SCHEME**](#IPPFIND_SERVICE_SCHEME)

URI scheme for DNS-SD registration type, e.g., "ipp", "http", etc.

[**IPPFIND\_SERVICE\_URI**](#IPPFIND_SERVICE_URI)

URI for service, e.g., "ipp://printer.local./ipp/print", "http://printer.local./", etc.

[**IPPFIND\_TXT\_*KEY***](#IPPFIND_TXT_)

Values of TXT record *KEY* (uppercase).

# [EXAMPLES](#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 \;
```

# [SEE ALSO](#SEE_ALSO)

[**ipptool**(1)](/man/os/cups/ipptool.1)

# [COPYRIGHT](#COPYRIGHT)

Copyright © 2020-2024 by OpenPrinting.

ippsample 2021-02-28

---

Document: ippfind(1) from cups 2.4.19-r6 (Chainguard OS)
Source: https://github.com/OpenPrinting/cups
