User guide
File and Directory Management Managing System Files
page 2-16 OmniSwitch 7700/7800/8800 Switch Management Guide April 2006
Changing File Attribute and Permissions
The chmod and attrib commands have the same function and use the same syntax. Use these commands
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.
Note. You must have read-write privileges to a file to change that file’s privileges.
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
Deleting a File
The delete command deletes an existing file. If you use the delete 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. The user of this command must have write privileges for any file being
deleted.
-> delete /flash/config.txt
Utility Commands
The utility commands include freespace, fsck, and newfs. These commands are used to check memory
and delete groups of files.
Displaying Free Memory Space
The freespace command displays the amount of free memory space available for use in the switch’s file
system. You may issue this command from any location in the switch’s directory tree.
-> freespace
/flash 16480256 bytes free
Performing a File System Check
The fsck command performs a file system check and can automatically repair any error found. It displays
diagnostic information in the event of file corruption. When you enter the command, you must specify the
flash directory as follows.
-> fsck /flash
The screen displays the following prompt:
Do you want fsck to automatically repair any errors found? (<CR> = No)