1getdgrp(1M) System Administration Commands getdgrp(1M)
2
3
4
6 getdgrp - lists device groups which contain devices that match criteria
7
9 /usr/sbin/getdgrp [-ael] [criteria]... [dgroup]...
10
11
13 getdgrp generates a list of device groups that contain devices matching
14 the given criteria. The criteria is given in the form of expressions.
15
17 The following options are supported:
18
19 -a Specifies that a device must match all criteria to be included in
20 the list generated by this command. The option has no effect if
21 no criteria are defined.
22
23
24 -e Specifies that the list of device groups on the command line
25 should be excluded from the list generated by this command. With‐
26 out the -e option the named device groups are included in the
27 generated list. The flag has no effect if no devices are defined.
28
29
30 -l Specifies that all device groups (subject to the -e option and
31 the dgroup list) should be listed even if they contain no valid
32 device members. This option has no affect if criteria is speci‐
33 fied on the command line.
34
35
37 The following operands are supported:
38
39 criteria Defines criteria that a device must match before a device
40 group to which it belongs can be included in the generated
41 list. Specify criteria as an expression or a list of
42 expressions which a device must meet for its group to be
43 included in the list generated by getdgrp. If no criteria
44 are given, all device groups are included in the list.
45
46 Devices must satisfy at least one of the criteria in the
47 list. However, the -a option can be used to define that a
48 "logical and" operation should be performed. Then, only
49 those groups containing devices which match all of the cri‐
50 teria in a list will be included.
51
52 There are four possible expressions types which the crite‐
53 ria specified in the criteria argument may follow:
54
55 attribute=value Selects all device groups with a member
56 whose attribute attribute is defined
57 and is equal to value.
58
59
60 attribute!=value Selects all device groups with a member
61 whose attribute attribute is defined
62 and does not equal value.
63
64
65 attribute:* Selects all device groups with a member
66 which has the attribute attribute
67 defined.
68
69
70 attribute!:* Selects all device groups with a member
71 which does not have the attribute
72 attribute defined.
73
74 See putdev(1M) for a complete listing and description of
75 available attributes.
76
77
78 dgroup Defines a set of device groups which should be included in
79 or excluded from the generated list. Device groups that are
80 defined and which contain devices matching the criteria
81 are included.
82
83 If the -e option is used, this list defines a set of
84 device groups to be excluded. When the -e option is used
85 and criteria is also defined, the generated list will
86 include device groups containing devices which match the
87 criteria and are not in the command line list.
88
89
91 The following exit values are returned:
92
93 0 Successful completion of the task.
94
95
96 1 Command syntax was incorrect, invalid option was used, or an
97 internal error occurred.
98
99
100 2 Device table or device group table could not be opened for read‐
101 ing.
102
103
105 /etc/device.tab
106
107
108 /etc/dgroup.tab
109
110
112 See attributes(5) for descriptions of the following attributes:
113
114
115
116
117 ┌─────────────────────────────┬─────────────────────────────┐
118 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
119 ├─────────────────────────────┼─────────────────────────────┤
120 │Availability │SUNWcsu │
121 └─────────────────────────────┴─────────────────────────────┘
122
124 devattr(1M), getdev(1M), putdev(1M), putdgrp(1M), attributes(5)
125
126
127
128SunOS 5.11 5 Jul 1990 getdgrp(1M)