94
delete
Use
delete
file
-
url
to temporarily delete a file.
Use
delete
/unreserved
file
-
url
to permanently delete a file.
Syntax
delete
[ /
unreserved
]
file
-
url
Views
User view
Default command level
3: Manage level
Parameters
/
unreserved
: Permanently deletes the specified file, and the deleted file can never be restored.
file
-
url
: Specifies the name of the file to be deleted. Asterisks (*) are acceptable as wildcards. For
example, to remove files with the extension of
.txt
in the current directory, use the
delete *
.txt command.
Usage guidelines
The
delete
file
-
url
command moves a file to the recycle bin. To restore the file, use the
undelete
command.
CAUTION:
If you delete two files with the same file name in different directories, only the last one is retained in the
recycle bin.
The
dir /all
command displays files moved to the recycle bin. These files are enclosed in pairs of square
brackets [ ]. To permanently delete these files, use the
reset recycle-bin
command.
The
delete
/unreserved
file
-
url
command permanently deletes a file, and the deleted file cannot be
restored.
Examples
# Remove file
tt.cfg
from the root directory of the storage medium on the master.
<Sysname> delete tt.cfg
.
Delete flash:/tt.cfg?[Y/N]:y
.
%Delete file flash:/tt.cfg...Done.
# Remove file
tt.cfg
from the root directory of the Flash on the subordinate device with the member ID 2:
•
Approach 1
<Sysname> delete slot2#flash:/tt.cfg
Delete slot2#flash:/tt.cfg?[Y/N]:y
%Delete file slot2#flash:/tt.cfg...Done.
•
Approach 2
<Sysname> cd slot2#flash:/
<Sysname> delete tt.cfg
Delete slot2#flash:/tt.cfg?[Y/N]:y
%Delete file slot2#flash:/tt.cfg...Done.