getdev(1M) getdev(1M)
NAME
getdev - list devices defined in the Device Database based on
criteria
SYNOPSIS
getdev [-ae] [criteria [. . .]] [device [. . .]]
DESCRIPTION
getdev generates a list of devices that match certain
criteria. These criteria include a list of attributes (given
in expressions) and a list of devices. If no criteria are
given, all devices are included in the generated list.
Options
The options for getdev are:
-a Specifies that the list of devices that follows on the
command line must match all criteria to be included in
the list generated by this command. The flag has no
effect if no criteria are defined.
-e Specifies that the list of devices following on the
command line should be excluded from the list generated
by this command. The flag has no effect if no devices
are defined.
criteria
Defines the criteria that a device must match to be
included in the generated list. The criteria should be
given in expressions.
device
Defines the devices that should be included or excluded
(based on the command options) in the generated list.
This can be the pathname of the device or the device
alias.
The criteria argument may be specified with any of the
following four expression types:
attribute=value
Select all devices for which attribute is defined and is
equal to value.
Copyright 1994 Novell, Inc. Page 1
getdev(1M) getdev(1M)
attribute!=value
Select all devices for which attribute is defined and
does not equal value.
attribute:*
Select all devices for which attribute is defined.
attribute!:*
Select all devices that do not have attribute defined.
See the putdev(1M) manual page for a complete listing and
description of available attributes.
Files
/etc/device.tab
Return Values
If successful, getdev exits with a code of 0. If there are
errors, the command exits with one of the following values and
prints the corresponding error message:
1 usage:getdev [-ae] [criterion[...]] [device[...]]
2 Device Database in inconsistent state - notify
administrator
2 Device Database could not be opened for reading
USAGE
Devices must satisfy at least one of the criteria in the list
unless the -a option is used. Then, only those devices that
match all the criteria in a list will be included in the
generated list.
Devices that are defined on the command line and that match
the criteria are included in the generated list. However, if
the -e flag is used, the list of devices defined on the
command line becomes a set of devices to be excluded from the
list.
REFERENCES
devattr(1M), getdgrp(1M), putdev(1M), putdgrp(1M)
Copyright 1994 Novell, Inc. Page 2