Lists devices that match the specified criteria.
getdev [ -a ] [ -e ] [ Criteria] [ DeviceList ]
Lists devices that match the given criteria. The criteria is given in the form of expressions. The getdev command can check all devices on the system or a specified list of devices.
Item | Description |
---|---|
-a | Specifies that a device must match all criteria to be included in the list generated by this command. The -a flag has no effect if no criteria are defined. |
-e | Specifies that the devices provided in the devicelist be excluded from the list generated by the getdev command. Without the -e flag only devices in the devicelist are generated. This flag is ignored if no devices are specified. |
Item | Description |
---|---|
Criteria | Defines criteria that a device must match before
it can be included in the generated list. Criteria can be specified
as an expression or a list of expressions which a device must meet
for it to be included in the list generated by getdev. If no
criteria are provided, all devices are included in the list. Devices must satisfy at least one of the criteria in the list. However, the -a option can be used to specify that a "logical and" operation should be performed. Then, only those devices that match all of the criteria in a list will be included. There are four possible
expression types which the criteria specified in the Criteria parameter may follow:
The following are the valid device attributes:
|
DeviceList | Specifies a space-separated list of devices to be checked for the Criteria. |
getdev
getdev type=logical_volume
getdev type!=logical_volume
getdev type=logical_volume alias=sys0
The output will look similar to the following: hd1
hd2
hd3
hd4
...
sys0
getdev -a type=logical_volume alias=lv01
getdev status:*
getdev desc!:*
Item | Description |
---|---|
/usr/sbin/getdev | Contains the getdev command |