xref: /titanic_52/usr/src/man/man1m/getdgrp.1m (revision 587644a8567e6a9533f88401daa59cbd78c4632f)
te
Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved.
Copyright 1989 AT&T
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
GETDGRP 1M "Jul 5, 1990"
NAME
getdgrp - lists device groups which contain devices that match criteria
SYNOPSIS

/usr/sbin/getdgrp [-ael] [criteria]... [dgroup]...
DESCRIPTION

getdgrp generates a list of device groups that contain devices matching the given criteria. The criteria is given in the form of expressions.

OPTIONS

The following options are supported: -a

Specifies that a device must match all criteria to be included in the list generated by this command. The option has no effect if no criteria are defined.

-e

Specifies that the list of device groups on the command line should be excluded from the list generated by this command. Without the -e option the named device groups are included in the generated list. The flag has no effect if no devices are defined.

-l

Specifies that all device groups (subject to the -e option and the dgroup list) should be listed even if they contain no valid device members. This option has no affect if criteria is specified on the command line.

OPERANDS

The following operands are supported: criteria

Defines criteria that a device must match before a device group to which it belongs can be included in the generated list. Specify criteria as an expression or a list of expressions which a device must meet for its group to be included in the list generated by getdgrp. If no criteria are given, all device groups 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 define that a "logical and" operation should be performed. Then, only those groups containing devices which match all of the criteria in a list will be included. There are four possible expressions types which the criteria specified in the criteria argument may follow: attribute=value

Selects all device groups with a member whose attribute attribute is defined and is equal to value.

attribute!=value

Selects all device groups with a member whose attribute attribute is defined and does not equal value.

attribute:*

Selects all device groups with a member which has the attribute attribute defined.

attribute!:*

Selects all device groups with a member which does not have the attribute attribute defined.

See putdev(1M) for a complete listing and description of available attributes.
dgroup

Defines a set of device groups which should be included in or excluded from the generated list. Device groups that are defined and which contain devices matching the criteria are included. If the -e option is used, this list defines a set of device groups to be excluded. When the -e option is used and criteria is also defined, the generated list will include device groups containing devices which match the criteria and are not in the command line list.

EXIT STATUS

The following exit values are returned: 0

Successful completion of the task.

1

Command syntax was incorrect, invalid option was used, or an internal error occurred.

2

Device table or device group table could not be opened for reading.

FILES
/etc/device.tab

/etc/dgroup.tab

SEE ALSO

devattr(1M), getdev(1M), putdev(1M), putdgrp(1M), attributes(5)