Deleting Files and Removing Directories

Use the delete and rd commands to delete files and remove directories. Directories can be removed even if they contain files and/or subdirectories. To remove a directory that contains files and/or subdirectories, use the rd rf command. When files or directories are deleted, they cannot be recovered.

The force option deletes the file or directory without prompting the user to confirm.

Use the CLI syntax displayed below to delete files and then remove directories:

CLI Syntax:
file> 
   delete file-url [force]
   rd file-url [force]

The following displays an example of the command syntax:

ALU-1>file cf3::\test1\ # delete test.cfg
ALU-1>file cf3::\test1\ # delete abc.cfg
ALU-1>file cf3::\test1\test2\ # cd test3
ALU-1>file cf3::\test1\test2\test3\ # cd ..
ALU-1>file cf3::\test1\test2\ # rd test3
ALU-1>file cf3::\test1\test2\ # cd ..
ALU-1>file cf3::\test1\ # rd test2
ALU-1>file cf3::\test1\ # cd ..
ALU-1>file cf3::\ # rd test1
ALU-1>file cf3::\ #

Use the CLI syntax displayed below to remove a directory without first deleting files or subdirectories:

CLI Syntax:
file> 
   rd file-url rf