OSF DCE Administration Guide--Core Components
OSF DCE Administration Guide—Core Components
considerations into account when deleting a directory:
• Does the directory contain child directories or the entries for any other CDS object?
Before a directory can be deleted, it must be empty.
• Are there any replicas of the directory? They must each be deleted separately.
Both of these considerations are discussed in following sections.
To delete a directory, you must have the following permissions:
• Delete permission to the directory.
• Write permission to the clearinghouse that stores the master replica of the directory.
• The server principal for the server from which you enter the directory delete
command needs administer permission to the parent directory or delete permission to
the child pointer that points to the directory you intend to delete.
If the server is included in the server authorization group subsys/dce/cds-servers,
these permissions should already be in place. If in doubt, use the acl show of the
dcecp utility and verify that the server principal has the appropriate permissions.
(See the acl(8dce) reference page for complete information on the acl show
command.)
21.3.1 Deleting a Nonreplicated Directory
To delete a directory that has no replicas, use the dcecp utility’s directory delete
command. For example, to delete the directory /.:/sales, all of its immediate contents,
and the contents of any of its child directories, you would enter the following:
dcecp> directory delete /.:/sales -tree
Note: Be careful when using the -tree option of the directory delete command.
The command does not ask you to confirm that you want to delete the
directory that you specify in the command line; it proceeds immediately
with the delete operation. This can result in the loss of directories that you
want to keep.
Remember that you can change the behavior of dcecp commands through
scripts. In the case of the directory delete command, you could write a
script that prompted for a confirmation of the delete operation whenever
the command was run with its -tree option. See Part 1 of this guide for a
discussion of writing scripts.
A way to guard against the inadvertent deletion of directories and their entries is to view
the contents before you run the directory delete command. To display the contents of a
CDS directory by entry type, use the directory list command with the -object, -link,
and -directory options.
The following is an example in which a directory named /.:/sales is deleted. The
directory has one object entry and one soft link:
21 − 8 Tandem Computers Incorporated 124243