8980 BIOS clock is sometimes one hour fast
[unleashed.git] / usr / src / man / man1m / getdgrp.1m
blob87f7f71a74ebc591b03f5cbd63ef6655fe89d2e7
1 '\" te
2 .\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved.
3 .\" Copyright 1989 AT&T
4 .\" 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.
5 .\" 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.
6 .\" 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]
7 .TH GETDGRP 1M "Jul 5, 1990"
8 .SH NAME
9 getdgrp \- lists device groups which contain devices that match criteria
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fB/usr/sbin/getdgrp\fR [\fB-ael\fR] [\fIcriteria\fR]... [\fIdgroup\fR]...
14 .fi
16 .SH DESCRIPTION
17 .sp
18 .LP
19 \fBgetdgrp\fR generates a list of device groups that contain devices matching
20 the given criteria. The criteria is given in the form of expressions.
21 .SH OPTIONS
22 .sp
23 .LP
24 The following options are supported:
25 .sp
26 .ne 2
27 .na
28 \fB\fB-a\fR\fR
29 .ad
30 .RS 6n
31 Specifies that a device must match all criteria to be included in the list
32 generated by this command. The option has no effect if no criteria are defined.
33 .RE
35 .sp
36 .ne 2
37 .na
38 \fB\fB-e\fR\fR
39 .ad
40 .RS 6n
41 Specifies that the list of device groups on the command line should be
42 \fIexcluded\fR from the list generated by this command. Without the  \fB-e\fR
43 option the named device groups are  \fIincluded\fR in  the generated list. The
44 flag has no effect if no devices are defined.
45 .RE
47 .sp
48 .ne 2
49 .na
50 \fB\fB-l\fR\fR
51 .ad
52 .RS 6n
53 Specifies that all device groups (subject to the  \fB-e\fR option and the
54 \fIdgroup\fR list) should be listed even if they contain no valid device
55 members. This option has no affect if  \fIcriteria\fR is specified on the
56 command line.
57 .RE
59 .SH OPERANDS
60 .sp
61 .LP
62 The following operands are supported:
63 .sp
64 .ne 2
65 .na
66 \fB\fIcriteria\fR\fR
67 .ad
68 .RS 12n
69 Defines criteria that a device must match before a device group to which it
70 belongs can be included in the generated list. Specify \fIcriteria\fR as an
71 expression or a list of expressions which a device must meet for its group to
72 be included in the list  generated by  \fBgetdgrp\fR. If no criteria are given,
73 all device groups are included in the list.
74 .sp
75 Devices must satisfy at least one of the criteria in the list. However,  the
76 \fB-a\fR option can be used to define that a "logical and" operation  should be
77 performed. Then, only those groups containing devices which match all of the
78 criteria in a list will be included.
79 .sp
80 There are four possible expressions types which the criteria specified in the
81 \fIcriteria\fR argument may follow:
82 .sp
83 .ne 2
84 .na
85 \fB\fIattribute\fR\fB=\fR\fIvalue\fR\fR
86 .ad
87 .RS 20n
88 Selects all device groups with a member whose attribute  \fIattribute\fR is
89 defined and is equal to  \fIvalue\fR.
90 .RE
92 .sp
93 .ne 2
94 .na
95 \fB\fIattribute\fR\fB!=\fR\fIvalue\fR\fR
96 .ad
97 .RS 20n
98 Selects all device groups with a member whose attribute  \fIattribute\fR is
99 defined and does not equal  \fIvalue\fR.
103 .ne 2
105 \fB\fIattribute\fR\fB:*\fR\fR
107 .RS 20n
108 Selects all device groups with a member which has the  attribute
109 \fIattribute\fR defined.
113 .ne 2
115 \fB\fIattribute\fR\fB!:*\fR\fR
117 .RS 20n
118 Selects all device groups with a member  which does not have the attribute
119 \fIattribute\fR defined.
122 See \fBputdev\fR(1M) for a complete listing and description of available
123 attributes.
127 .ne 2
129 \fB\fIdgroup\fR\fR
131 .RS 12n
132 Defines a set of device groups which should be included in or excluded from the
133 generated list. Device groups that are defined and which contain devices
134 matching  the criteria are included.
136 If the  \fB-e\fR option is used, this list defines a set of device groups to be
137 excluded. When the  \fB-e\fR option is used and  \fIcriteria\fR is also
138 defined, the generated list will include device groups containing devices
139 which match the criteria and are not in the command line list.
142 .SH EXIT STATUS
145 The following exit values are returned:
147 .ne 2
149 \fB\fB0\fR\fR
151 .RS 5n
152 Successful completion of the task.
156 .ne 2
158 \fB\fB1\fR\fR
160 .RS 5n
161 Command syntax was incorrect, invalid option was used, or an internal error
162 occurred.
166 .ne 2
168 \fB\fB2\fR\fR
170 .RS 5n
171 Device table or device group table could not be opened for reading.
174 .SH FILES
176 .ne 2
178 \fB\fB/etc/device.tab\fR\fR
180 .RS 19n
185 .ne 2
187 \fB\fB/etc/dgroup.tab\fR\fR
189 .RS 19n
193 .SH SEE ALSO
196 \fBdevattr\fR(1M), \fBgetdev\fR(1M), \fBputdev\fR(1M), \fBputdgrp\fR(1M),
197 \fBattributes\fR(5)