Creating and Managing Files
©2008 Allied Telesis Inc. All rights reserved.
6.10
AlliedWare Plus
TM
Operating System Software Reference C613-50003-00 REV E
Software Version 5.2.1
Copying within a file system
Within a
directory
To copy a file within the same directory, enter Privileged Exec mode and enter the command:
awplus#copy <
source-filename
> <
destination-filename
>
If the file already exists, the switch asks whether to overwrite it, with a message like this:
Overwrite flash:/example.cfg? (y/n)[n]:
To overwrite, press the “y” key then the Enter key.
Between
directories
To copy a file to another directory within the same file system, enter the command:
awplus#copy <
source-filename
> <
directory-name
>/
The / after the directory name is required. Otherwise the switch displays an error
(“37: Destination file is a directory”).
The switch then prompts you for the destination filename. To give the copy a new name, type
the name at the prompt. You can include directory names in the path.
To use the same filename as the original, press the Enter key (do not press the “y” key—that
names the copy “y”).
Example
To put a copy of example.cfg into the example directory, enter the command:
awplus#copy example.cfg example/
The prompt and messages look like this:
Copying To and From NVS or SD card
To copy between file systems, you need to specify the file system prefix (nvs: or card:).
For example, to copy from Flash to NVS when your current directory is the top-level Flash
directory, enter Privileged Exec mode and enter the command:
awplus#copy <
source-filename
> nvs:
The switch prompts you for the filename, as described in the previous section.
To copy from NVS to Flash when your current directory is the top-level Flash directory, enter
the command:
awplus#copy nvs:<
source-filename
> <
destination-filename
>
Example
To copy the file “example.txt” from the directory in NVS called “example” to the top level of
Flash, enter the command:
awplus#copy nvs:example/example.txt example.txt
Enter destination file name [example.cfg]:
Copying from source file, please wait...
Copying to destination file, please wait...
0: Successful operation