File Commands; Creating Or Modifying Files; Copy An Existing File - Alcatel-Lucent OmniSwitch 6450 Management Manual

Hide thumbs Also See for OmniSwitch 6450:
Table of Contents

Advertisement

File and Directory Management

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
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 the
cp
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 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 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
page 1-14
cp
command.
OmniSwitch 6250/6450 Switch Management Guide
Managing System Files
vi
command
June 2013

Advertisement

Table of Contents
loading

This manual is also suitable for:

Omniswitch 6350Omniswitch 6250

Table of Contents