Sun Microsystems 5310 NAS Server User Manual


 
2-138 Sun StorEdge 5310 NAS Troubleshooting Guide December 2004
Remove the directory '/vol1/dir1' if it is empty.
SE5310 > rm /vol1/dir1
Remove the file hierarchy rooted at '/vol1/dir1' displaying each file as it is removed.
SE5310 > rm -r -v /vol1/dir1 This removes all files and the
directory.
Note – All paths must be absolute paths from the root directory.
To delete directories from the CLI using rmdir
The rmdir utility removes the directory entry specified by each directory argument,
provided it is empty. Arguments are processed in the order given. In order to
remove both a parent directory and a subdirectory of that parent, the subdirectory
must be specified first so the parent directory is empty when rmdir tries to remove
it.
Example:
rmdir /vol1/d1 /vol1/d2 /vol1/d3 /vol1
Note – All paths must be absolute paths from the root directory.
How do I recursively delete directories from the StorEdge
administration utilities?
StorEdge provides a utility to delete entire directory trees, including their contents.
This is a very powerful tool, but one that comes with some risk. This command
immediately and permanently deletes files and directories, or even the entire
contents of a volume. This tool should be used very carefully, and the entry should
be carefully checked before entering. No messages asking to verify will be presented.
In order to prevent accidental or unauthorized deletions, this command must be
manually loaded before use. This functionality is only available at the StorEdge CLI
(command line interface).
1. To access the StorEdge CLI, connect to the StorEdge via Telnet or serial console.
2. Type “admin” at the [menu] prompt and enter the administrator password.
3. At the CLI, enter “load rdel.nsm”.
4. Enter “rdel <pathname>”. The pathname must be a full path including volume
name.