| #### directory modify Adds, removes, or changes a directory's attributes and their values. The syntax is: directory modify directory_name_list {-add attribute_list] [-single] | -remove attribute_list [-types] | -change attribute_list | master clearinghouse_name [-readonly clearinghouse_name_list] [-exclude clearinghouse_name_list]} Options -add attribute_list Adds a value to a modifiable, set-valued attribute (including application-defined attributes) of a directory. If you enter a byte data type, you must enter an even number of digits in length. You can only enter pairs of hexadecimal values for user-defined attributes. -single Used with the -add option, this option specifies that the attributes to be added are to be single-valued. Normally all user defined attributes are defined to be multivalued, even if only one value is specified. This option is not legal without the -add option. -remove attribute_list Removes a value from a set-valued or single-valued attribute (including application-defined attributes) of a directory. If you do not specify a value, the command removes the entire attribute. This command can delete attributes created with the -add and -change options. -types Used with the -remove option, this option specifies that the value of the -remove option is a list of attribute types. This means that the entire attribute should be removed, not just a value. This option is not legal without the -remove option. -change attribute_list Changes the value of a modifiable, single-valued attribute of a directory. You can specify an application-defined attribute or the following attribute, which specifies the degree of consistency among replicas: {CDS_Convergence value} See Attributes for the format of CDS_Convergence. -master clearinghouse_name To change the epoch of a directory, use the -master option to specify a new master clearinghouse for the directory. -readonly clearinghouse_name_list When changing the epoch of a directory, specifies which clearinghouses will hold a replica for the directory. -exclude clearinghouse_name_list When changing the epoch of a directory, specifies which clearinghouses will no longer be used as replicas for the directory. Description The directory modify operation adds, removes, or changes a directory's attributes and their values. The argument is a list of one or more names of directories to be operated on. Attribute options are not supported; use one or more of -add, -remove or -change options, each of which takes an attribute list as an argument. Usually, you use the -remove option to remove a value from an attribute. You can use the -types option along with the -remove option to remove an entire attribute or list of attributes. Some attributes in CDS are multivalued. For instance the CDS_Replicas attribute can specify the locations and names several clearinghouses that maintain copies of a directory. The -add operation needs to be instructed whether to operate on single-valued or multivalued attributes. Multivalued attributes are the default case and are indicated by using no qualifying options. However, you can indicate the use of single-valued attributes by using the -single option. To change the epoch of a directory, you must specify each clearinghouse that has a master or replica copy of the directory as either the new master (with the -master option), a read-only copy (with the -readonly option), or an excluded copy (with the -exclude option). Additional extra clearinghouses can also be specified. Most attributes are usually managed by the client application. See the OSF DCE Administration Guide - Core Components for more information about attributes. All modifications are made to each directory listed in the argument. An error in any one causes the command to immediately abort and generate an error. The operation returns an empty string on success. Privileges Required You must have w (write) permission to the directory to add, remove, or change attributes. Examples The following command sets the CDS_Convergence attribute on the /.:/depts/radiology directory to a value of low. dcecp> directory modify /.:/depts/radiology -change {CDS_Convergence low} To add the value ontario to the attribute myname of a directory named /.:/sales, read the cds_attributes file to verify that the attribute shown in the following display exists: OID LABEL SYNTAX 1.3.22.1.3.91 myname char Enter the following command to assign the value ontario to the attribute myname: dcecp> directory modify /.:/sales -add {myname ontario} To remove the value 1 from the user-defined, set-valued attribute dirregion of a directory named /.:/sales, follow these steps: 1. Read the cds_attributes file to check that the attribute dirregion is listed, as shown in the following display: OID LABEL SYNTAX 1.3.22.1.3.66 dirregion small 2. Enter the following command to remove the value 1 from the attribute dirregion: dcecp> directory modify /.:/sales -remove {dirregion 1} dcecp> 3. To change the epoch of a directory with one master and two replicas, enter the following command: dcecp> directory modify /.:/oddball -master /.:/gumby-ch \ > -readonly /.:/pokey-ch -exclude /.:/goober-ch dcecp> ####