ippfind(1)
π ippfind(1) β the OpenPrinting girlies' guide to finding your printers π
okay so bestie, welcome to ippfind, one of the OpenPrinting crew β¨ She's a whole icon: she goes out and finds services registered with a DNS server, or services chillin' on your local devices. Her main character purpose? Find IPP printers, show their URIs, show their current status, or run commands. Periodt. π
πΈ 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. Like, she's not just a finder, she's a lifestyle. π¦
π 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 π§
So ippfind supports expressions much like the find(1) utility. But β and this is the plot twist β unlike find(1), ippfind uses POSIX regular expressions instead of shell filename matching patterns. No cap. π€
And here's the lil default-behaviour moment: 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. She's helpful like that. π«Ά
The following expressions are supported:
-d regex,--domain regexβ True if the domain matches the given regular expression.--falseβ Always false. (the hater of the group π)-h regex,--host regexβ True is the hostname matches the given regular expression. (yes, the manpage says "True is", we're keeping it, character for character bestie π)-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. (the supportive bestie π)-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.
π Modifiers, because expressions can have layers π
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, typically631for IPP and80for 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. If1or less,ippfindstops as soon as it thinks it has found everything. The default timeout is1second.-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 true1β if the result of any processed expression is false2β if browsing or any query or resolution failed3β if an undefined option or invalid expression was specified4β if it ran out of memory
four means she ran out of memory, bestie, she's literally fighting for her life π give her a minute
π 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, typically631for IPP and80for 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 \;
like?? the {} gets swapped for the real URI and off it goes. iconic behaviour, honestly. π
π¦ SEE ALSO π¦
π COPYRIGHT π
Copyright Β© 2020-2024 by OpenPrinting.
and that's the whole page, bestie β brought to you by the fine folks at ippsample, dated 2021-02-28, and yeah the manual page itself is literally named ippfind(1) too, we've come full circle π stay slaying, go find those printers, ily π
π¦ where this page comes from
- alpine 3.22: cups-doc 2.4.18-r0 Β· Apache-2.0
- alpine 3.23: cups-doc 2.4.18-r0 Β· Apache-2.0
- alpine 3.24: cups-doc 2.4.19-r1 Β· Apache-2.0
- centos-stream 10: cups-ipptool 1:2.4.10-18.el10 Β· Apache-2.0 WITH LLVM-exception AND BSD-3-Clause AND Zlib AND BSD-2-Clause
- debian trixie: cups-ipp-utils 2.4.10-3+deb13u1 Β· Apache-2.0-with-GPL2-LGPL2-Exception
- debian trixie: cups-ipp-utils 2.4.10-3+deb13u2 Β· Apache-2.0-with-GPL2-LGPL2-Exception
- fedora 43: cups-ipptool 1:2.4.14-2.fc43 Β· Apache-2.0 WITH LLVM-exception AND BSD-3-Clause AND Zlib AND BSD-2-Clause
- fedora 43: cups-ipptool 1:2.4.19-3.fc43 Β· Apache-2.0 WITH LLVM-exception AND BSD-3-Clause AND Zlib AND BSD-2-Clause
- fedora 44: cups-ipptool 1:2.4.16-7.fc44 Β· Apache-2.0 WITH LLVM-exception AND BSD-3-Clause AND Zlib AND BSD-2-Clause
- fedora 44: cups-ipptool 1:2.4.19-3.fc44 Β· Apache-2.0 WITH LLVM-exception AND BSD-3-Clause AND Zlib AND BSD-2-Clause
- nixpkgs unstable: cups 2.4.19
- opensuse-leap 16.0: cups-client 2.4.19-160000.2.1 Β· Apache-2.0
- opensuse-leap 16.0: cups-client 2.4.19-160000.2.1 Β· Apache-2.0
- opensuse-leap 16.0: cups-client 2.4.19-160000.2.1 Β· Apache-2.0
- opensuse-leap 16.0: cups-client 2.4.19-160000.2.1 Β· Apache-2.0
- ubuntu questing: cups-ipp-utils 2.4.12-0ubuntu3
- ubuntu questing: cups-ipp-utils 2.4.12-0ubuntu3.10
- ubuntu resolute: cups-ipp-utils 2.4.16-1ubuntu1 Β· Apache-2.0-with-GPL2-LGPL2-Exception
- ubuntu resolute: cups-ipp-utils 2.4.16-1ubuntu1.3 Β· Apache-2.0-with-GPL2-LGPL2-Exception
- ubuntu stonking: cups-ipp-utils 2.4.16-1ubuntu3 Β· Apache-2.0-with-GPL2-LGPL2-Exception
- Copyright Β© 2020-2024 by OpenPrinting
- Copyright Β© 2013-2019 by Apple Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms