directory delete
Deletes a directory. The syntax is:
directory delete directory_name_list [[-tree] [-force] |
-replica -clearinghouse clearinghouse_name]
Options
-tree Removes the directory and everything (all directories, objects, links, and clearinghouses) beneath it.
-replica Specifies that the directory created is a replica of an existing directory. If you use the -replica option, you must specify a clearinghouse using the
-clearinghouse option.
-force Allows the delete operation to proceed by deleting existing replicas.
-clearinghouse clearinghouse_name Required with the -replica option, the -clearinghouse option names one clearinghouse (not a list of
clearinghouses) in which the replica is to be deleted.
Description The directory delete operation deletes a directory from the CDS name service. The directory_name_list argument is a list of names of directories
to be deleted. If the directory is not empty, the command returns an error unless the -tree option is used. The -tree option (takes no value) removes the directory and everything
(all directories, objects, links, and clearinghouses) beneath it.
The -force option also deletes replicas.
The -replica and a -clearinghouse options (they must be used together) let you delete a replica instead of a directory. The clearinghouse the replica is in is specified as the
value the -clearinghouse option; only one value can be specified, not a list. Returns an empty string on success. If a specified directory does not exist, an error is generated.
The -replica and -clearinghouse options cannot be used with the -tree option.
Privileges Required You must have d (delete) permission to the directory and w (write) permission to the clearinghouse that stores the master
replica of the directory. The server principal (hosts/hostname/cds-server) needs A (Admin) permission to the parent directory or d
(delete) permission to the child pointer that points to the directory you intend to delete.
Examples The following command deletes the directory /.:/eng from the namespace:
dcecp> directory delete /.:/eng dcecp>
The following command tries to delete a non-empty directory /.:/depts/phrenology and gets an error. The second attempt uses the -tree option to delete the directory and
all the directories and objects beneath it.
dcecp> dir delete /.:/depts/phrenology Error: Directory must be empty to be deleted dcecp> dir delete /.:/depts/phrenology -tree
dcecp>
|