File System Management Commands 409
Description
Use the pwd command to display the current path.
Error may occur without setting the current path.
Example
Display the current path.
<SW5500>pwd
unit1>flash:
rename Syntax
rename
filepath-source filepath-dest
View
User view
Parameter
filepath
-
source
: Source file name.
filepath
-
dest
: Destination file name.
Description
Use the rename command to rename a file.
If the destination file name is the same as an existing directory name, the rename
operation will fail. If the destination file name is the same as an existing file name,
a prompt will be displayed asking whether to overwrite the existing file.
Example
Display the current directory information.
<SW5500>dir
Directory of unit1>flash:
0 drw- 0 Jul 12 2001 19:41:20 test
1 -rw- 50 Jul 12 2001 20:26:48 sample.txt
16125952 bytes total (13970432 bytes free)
Rename the file sample.txt with sample.bak.
<SW5500>rename sample.txt sample.bak
Rename flash:/sample.txt to flash:/sample.bak ?[confirm]:y
% Renamed file unit1>flash:/sample.txt unit1>flash:/sample.bak
Display the directory after renaming sample.txt with sample.bak.
<SW5500>dir
Directory of unit1>flash:
0 -rw- 2145718 Jul 12 2001 12:28:08 ne80.bin
1 drw- 0 Jul 12 2001 19:41:20 test
2 -rw- 50 Jul 12 2001 20:29:55 sample.bak
16125952 bytes total (13970432 bytes free)
reset recycle-bin Syntax
reset recycle-bin
file-path
[/force]