|GETCAP(1)||General Commands Manual||GETCAP(1)|
getcaputility provides a simple method for querying a capability database such as /etc/login.conf or /etc/printcap and as described by getcap(3).
The following query types are supported:
getcap prints the value associated with
the given key. If more than one record is being searched, the value is
prefixed with the record name (for records with multiple names, only the
first is printed). If a key has no associated value and a boolean query is
not being performed, a blank line will be printed.
The options are as follows:
Only one of the
-s options may be specified. If none are specified,
the record will be dumped from the database as is.
$ getcap -f /etc/login.conf -a -b ignorenologin
Dump the “default” record in login.conf(5):
$ getcap -f /etc/login.conf default
Print all login.conf(5) records with the “localcipher” capability:
$ getcap -f /etc/login.conf -a -s localcipher
Print the “datasize-max” capability in the “staff” record in login.conf(5) if it exists:
$ getcap -f /etc/login.conf -s datasize-max staff
Print all printcap(5) entries that reference /dev/lp. Note that we are treating the entire string “lp=/dev/lp” as a boolean flag instead of a key/value pair.
$ getcap -f /etc/printcap -a -b lp=/dev/lp
getcapcommand appeared in OpenBSD 3.7.
|January 25, 2019||OpenBSD-current|