Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

getdgrp(1m) [opensolaris man page]

getdgrp(1M)						  System Administration Commands					       getdgrp(1M)

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 expres- sions. 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 ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
devattr(1M), getdev(1M), putdev(1M), putdgrp(1M), attributes(5) SunOS 5.11 5 Jul 1990 getdgrp(1M)

Check Out this Related Man Page

putdev(1M)						  System Administration Commands						putdev(1M)

NAME
putdev - edits device table SYNOPSIS
putdev -a alias [ attribute=value [...]] putdev -m device attribute=value [ attribute = value [...]] putdev -d device [ attribute [...]] DESCRIPTION
putdev adds a new device to the device table, modifies an existing device description or removes a device entry from the table. The first synopsis is used to add a device. The second synopsis is used to modify existing entries by adding or changing attributes. If a specified attribute is not defined, this option adds that attribute to the device definition. If a specified attribute is already defined, it modi- fies the attribute definition. The third synopsis is used to delete either an entire device entry or, if the attribute argument is used, to delete an attribute assignment for a device. OPTIONS
The following options are supported: -a Add a device to the device table using the specified attributes. The device must be referenced by its alias. -d Remove a device from the device table, when executed without the attributes argument. Used with the attribute argument, it deletes the given attribute specification for device from the table. -m Modify a device entry in the device table. If an entry already exists, it adds any specified attributes that are not defined. It also modifies any attributes which already have a value with the value specified by this command. OPERANDS
The following operands are supported: alias Designates the alias of the device to be added. attribute Designates a device attribute to be added, modified, or deleted. Can be any of the device attributes described under DEVICE ATTRIBUTES except alias. This prevents an accidental modification or deletion of a device's alias from the table. device Designates the pathname or alias of the device whose attribute is to be added, modified, or removed. value Designates the value to be assigned to a device's attribute. DEVICE ATTRIBUTES
The following list shows the standard device attributes, used by applications such as ufsdump(1M) and ufsrestore(1M), which can be defined for a device. You are not limited to this list, you can define any attribute you like. alias The unique name by which a device is known. No two devices in the database may share the same alias name. The name is lim- ited in length to 14 characters and should contain only alphanumeric characters and the following special characters if they are escaped with a backslash: underscore ( _ ), dollar sign ($), hyphen (-), and period (.). bdevice The pathname to the block special device node associated with the device, if any. The associated major/minor combination should be unique within the database and should match that associated with the cdevice field, if any. (It is the adminis- trator's responsibility to ensure that these major/minor numbers are unique in the database.) capacity The capacity of the device or of the typical volume, if removable. cdevice The pathname to the character special device node associated with the device, if any. The associated major/minor combina- tion should be unique within the database and should match that associated with the bdevice field, if any. (It is the administrator's responsibility to ensure that these major/minor numbers are unique in the database.) cyl Used by the command specified in the mkfscmd attribute. desc A description of any instance of a volume associated with this device (such as floppy diskette). dpartlist The list of disk partitions associated with this device. Used only if type=disk. The list should contain device aliases, each of which must have type=dpart. dparttype The type of disk partition represented by this device. Used only if type=dpart. It should be either fs (for file system) or dp (for data partition). erasecmd The command string that, when executed, erases the device. fmtcmd The command string that, when executed, formats the device. fsname The file system name on the file system administered on this partition, as supplied to the /usr/sbin/labelit command. This attribute is specified only if type=dpart and dparttype=fs. gap Used by the command specified in the mkfscmd attribute. mkfscmd The command string that, when executed, places a file system on a previously formatted device. mountpt The default mount point to use for the device. Used only if the device is mountable. For disk partitions where type=dpart and dparttype=fs, this attribute should specify the location where the partition is normally mounted. nblocks The number of blocks in the file system administered on this partition. Used only if type=dpart and dparttype=fs. ninodes The number of inodes in the file system administered on this partition. Used only if type=dpart and dparttype=fs. norewind The name of the character special device node that allows access to the serial device without rewinding when the device is closed. pathname Defines the pathname to an i-node describing the device (used for non-block or character device pathnames, such as directo- ries). type A token that represents inherent qualities of the device. Standard types include: 9-track, ctape, disk, directory, diskette, dpart, and qtape. volname The volume name on the file system administered on this partition, as supplied to the /usr/sbin/labelit command. Used only if type=dpart and dparttype=fs. volume A text string used to describe any instance of a volume associated with this device. This attribute should not be defined for devices which are not removable. EXIT STATUS
The following exit values are returned: 0 Successful completion. 1 Command syntax was incorrect, an invalid option was used, or an internal error occurred. 2 The device table could not be opened for reading, or a new device table could not be created. 3 If executed with the -a option, indicates that an entry in the device table with the alias alias already exits. If executed with the -m or -d options, indicates that no entry exists for device device. 4 Indicates that -d was requested and one or more of the specified attributes were not defined for the device. FILES
/etc/device.tab ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
devattr(1M), putdgrp(1M), ufsdump(1M), ufsrestore(1M), attributes(5) System Administration Guide: Basic Administration SunOS 5.10 3 Apr 1997 putdev(1M)
Man Page