2 .\" Copyright 1989 AT&T Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH GETDEV 8 "Jul 5, 1990"
8 getdev \- lists devices based on criteria
12 \fBgetdev\fR [\fB-ae\fR] [\fIcriteria\fR]... [\fIdevice\fR]...
18 \fBgetdev\fR generates a list of devices that match certain criteria. The
19 criteria includes a list of attributes (given in expressions) and a list of
20 devices. If no criteria are given, all devices are included in the list.
23 Devices must satisfy at least one of the criteria in the list unless the
24 \fB-a\fR option is used. Then, only those devices which match all of the
25 criteria in a list will be included.
28 Devices which are defined on the command line and which match the criteria are
29 included in the generated list. However, if the \fB-e\fR option is used, the
30 list becomes a set of devices to be \fIexcluded\fR from the list. See
31 \fBOPTIONS\fR and \fBOPERANDS\fR.
35 The following options are supported:
42 Specifies that a device must match all criteria to be included in the list
43 generated by this command. The option has no effect if no criteria are defined.
52 Specifies that the list of devices which follows on the command line should be
53 \fIexcluded\fR from the list generated by this command. Without the \fB-e\fR
54 the named devices are \fIincluded\fR in the generated list. The flag has no
55 effect if no devices are defined.
61 The following operands are supported:
68 Defines the criteria that a device must match to be included in the generated
69 list. \fIcriteria\fR is specified by expressions.
71 There are four possible expression types which the criteria specified in the
72 \fIcriteria\fR argument may follow:
76 \fB\fIattribute\fR\fB=\fR\fIvalue\fR\fR
79 Selects all devices whose attribute \fIattribute\fR is defined and is equal to
86 \fB\fIattribute\fR\fB!=\fR\fIvalue\fR\fR
89 Selects all devices whose attribute \fIattribute\fR is defined and does not
96 \fB\fIattribute\fR\fB:*\fR\fR
99 Selects all devices which have the attribute \fIattribute\fR defined.
105 \fB\fIattribute\fR\fB!:*\fR\fR
108 Selects all devices which do not have the attribute \fIattribute\fR defined.
111 See the \fBputdev\fR(8) manual page for a complete listing and description of
112 available attributes.
121 Defines the devices which should be included in the generated list. This can be
122 the pathname of the device or the device alias.
128 The following exit values are returned:
135 Successful completion.
144 Command syntax was incorrect, invalid option was used, or an internal error
154 Device table could not be opened for reading.
161 \fB\fB/etc/device.tab\fR\fR
170 \fBdevattr\fR(8), \fBgetdgrp\fR(8), \fBputdev\fR(8), \fBputdgrp\fR(8),