User guide
File and Directory Management Managing System Files
page 3-10 OmniSwitch AOS Release 7 Switch Management Guide March 2015
Move an Existing File or Directory
The mv command is used to move an existing file or directory to another location. You can specify the
path and name for the file or directory being moved. If no path is specified, the command assumes the
current path. You can also specify a path and a new name for the file or directory being moved. If no name
is specified, the existing name will be used.
-> mv /flash/testfiles/testfile2 /flash/working/testfile2
-> mv testfile2 /flash/working/newtestfile2
Change File Attribute and Permissions
The chmod command can be used to change read-write privileges for the specified file. The following
syntax sets the privilege for the config1.txt file to read-write. In this example, the user’s current directory
is the /flash file directory. For example:
To set the permission for the config1.txt file to read-only, use the following syntax.
-> chmod -w /flash/config1.txt
To set the permission for the config1.txt file to read/write, use the following syntax.
-> chmod +w /flash/config1.txt
Delete an Existing File
The delete command deletes an existing file. If you use the rm command from the directory containing the
file, you do not need to specify a path. If you are in another directory, you must specify the path and name
for the file being deleted. For example:
-> rm /flash/config.txt