1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
|
'\" 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]
.TH GETDGRP 1M "Jul 5, 1990"
.SH NAME
getdgrp \- lists device groups which contain devices that match criteria
.SH SYNOPSIS
.LP
.nf
\fB/usr/sbin/getdgrp\fR [\fB-ael\fR] [\fIcriteria\fR]... [\fIdgroup\fR]...
.fi
.SH DESCRIPTION
.sp
.LP
\fBgetdgrp\fR generates a list of device groups that contain devices matching
the given criteria. The criteria is given in the form of expressions.
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-a\fR\fR
.ad
.RS 6n
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.
.RE
.sp
.ne 2
.na
\fB\fB-e\fR\fR
.ad
.RS 6n
Specifies that the list of device groups on the command line should be
\fIexcluded\fR from the list generated by this command. Without the \fB-e\fR
option the named device groups are \fIincluded\fR in the generated list. The
flag has no effect if no devices are defined.
.RE
.sp
.ne 2
.na
\fB\fB-l\fR\fR
.ad
.RS 6n
Specifies that all device groups (subject to the \fB-e\fR option and the
\fIdgroup\fR list) should be listed even if they contain no valid device
members. This option has no affect if \fIcriteria\fR is specified on the
command line.
.RE
.SH OPERANDS
.sp
.LP
The following operands are supported:
.sp
.ne 2
.na
\fB\fIcriteria\fR\fR
.ad
.RS 12n
Defines criteria that a device must match before a device group to which it
belongs can be included in the generated list. Specify \fIcriteria\fR as an
expression or a list of expressions which a device must meet for its group to
be included in the list generated by \fBgetdgrp\fR. If no criteria are given,
all device groups are included in the list.
.sp
Devices must satisfy at least one of the criteria in the list. However, the
\fB-a\fR 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.
.sp
There are four possible expressions types which the criteria specified in the
\fIcriteria\fR argument may follow:
.sp
.ne 2
.na
\fB\fIattribute\fR\fB=\fR\fIvalue\fR\fR
.ad
.RS 20n
Selects all device groups with a member whose attribute \fIattribute\fR is
defined and is equal to \fIvalue\fR.
.RE
.sp
.ne 2
.na
\fB\fIattribute\fR\fB!=\fR\fIvalue\fR\fR
.ad
.RS 20n
Selects all device groups with a member whose attribute \fIattribute\fR is
defined and does not equal \fIvalue\fR.
.RE
.sp
.ne 2
.na
\fB\fIattribute\fR\fB:*\fR\fR
.ad
.RS 20n
Selects all device groups with a member which has the attribute
\fIattribute\fR defined.
.RE
.sp
.ne 2
.na
\fB\fIattribute\fR\fB!:*\fR\fR
.ad
.RS 20n
Selects all device groups with a member which does not have the attribute
\fIattribute\fR defined.
.RE
See \fBputdev\fR(1M) for a complete listing and description of available
attributes.
.RE
.sp
.ne 2
.na
\fB\fIdgroup\fR\fR
.ad
.RS 12n
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.
.sp
If the \fB-e\fR option is used, this list defines a set of device groups to be
excluded. When the \fB-e\fR option is used and \fIcriteria\fR is also
defined, the generated list will include device groups containing devices
which match the criteria and are not in the command line list.
.RE
.SH EXIT STATUS
.sp
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 5n
Successful completion of the task.
.RE
.sp
.ne 2
.na
\fB\fB1\fR\fR
.ad
.RS 5n
Command syntax was incorrect, invalid option was used, or an internal error
occurred.
.RE
.sp
.ne 2
.na
\fB\fB2\fR\fR
.ad
.RS 5n
Device table or device group table could not be opened for reading.
.RE
.SH FILES
.sp
.ne 2
.na
\fB\fB/etc/device.tab\fR\fR
.ad
.RS 19n
.RE
.sp
.ne 2
.na
\fB\fB/etc/dgroup.tab\fR\fR
.ad
.RS 19n
.RE
.SH SEE ALSO
.sp
.LP
\fBdevattr\fR(1M), \fBgetdev\fR(1M), \fBputdev\fR(1M), \fBputdgrp\fR(1M),
\fBattributes\fR(5)
|