Alcatel-Lucent 6850-48 Supplementary Manual

Page of 312
File and Directory Management
Managing System Files
page 1-14
OmniSwitch AOS Release 6 Switch Management Guide
September 2009
File Commands
The file commands apply to files located in the /flash file directory and its sub-directories.
Note. Each file in any directory must have a unique name. If you attempt to create or copy a file into a 
directory where a file of the same name already exists, you will overwrite or destroy one of the files.
Creating or Modifying Files
The switch has an editor for creating or modifying files. The editor is invoked by entering the 
 command 
and the name of the new file or existing file that you want to modify. For example:
-> vi /flash/my_file
This command puts the switch in editor mode for my_file. If my_file does not already exist, the switch 
will create the file in the flash directory. In the editing mode, the switch uses command keystrokes similar 
to any vi UNIX text editor. For example, to quit the edit session and save changes to the file, type ZZ to 
return to the CLI prompt.
Copy an Existing File
Use th
 command to copy an existing file. You can specify the path and filename for the original file 
being copied as well as the path and filename for the new copy being created. If no path is specified, the 
command assumes the current directory. The following syntax copies the Kos.img file from the working 
directory to the certified directory.
->cp /flash/working/Kos.img /flash/certified
This second example presumes that the user’s current directory is the /flash/working directory. Here, it is 
not necessary to specify a path for the original file. A copy of Kos.img will appear in the /flash/certified 
directory once the following command is executed.
->cp Kos.img /flash/certified
This third example presumes that the user’s current directory is the flash directory. To copy a file into the 
same directory where the file currently exists, the user must specify a new filename. The following 
command will result in the Kbase.img file being copied into the /flash/working directory under the new 
name of newfile.img. Both Kos.img and its copy newfile.img will appear in the /flash/working directory.
->cp /flash/working/Kbase.img newfile.img
In these examples, a new file will be written to the specified or assumed path with the new filename. If 
you do not specify a new filename, the new file will have the same name as the copied file. If you copy a 
file to its own directory, you must specify a new filename. In each case, the file being copied will remain 
in its original location.
Note. You must have write privileges in order to execute the