User guide
File and Directory Management Managing System Files
page 3-8 OmniSwitch AOS Release 7 Switch Management Guide March 2015
Changing Directories
Use the cd command to navigate within the file directory structure. The cd command allows you to move
“up” or “down” the directory tree. To go down, you must specify a directory located in your current direc-
tory. For example:
->pwd
/flash
->cd certified
->pwd
/flash/certified
To move “up” the directory tree, use the cd command. Enter cd .. without specifying a directory name and
your current directory will move up one directory level. If you enter cd without the dots, your current
directory will move to the top of the tree. The following example shows the cd command used where the
current directory is /flash/certified.
->pwd
/flash/certified
-> cd
->
To verify that your current directory has moved up the directory tree, use the pwd command to display
your location. The display shows you have moved up one level from the /flash/certified directory and that
your current directory is /flash.
-> pwd
/flash
If you use the cd command while you are at the top of the directory tree, the cd command will have no
effect on the location of your login. In other words, if you use cd while your current directory is /flash,
your current directory will remain /flash after you execute the cd command.
Making a New Directory
To make a new directory use the mkdir command. You may specify a path for the new directory. Other-
wise, the new directory will be created in your current directory. The syntax for this command requires a
slash (/) and no space between the path and the new directory name. Also, a slash (/) is required at the
beginning of your path specification.
The following command makes a new directory in the dir1 directory on an OmniSwitch:
-> mkdir /flash/dir1/newdir1
Copying an Existing Directory
The cp command copies directories, as well as any associated subdirectories and files. Before using this
command, you should make sure you have enough memory space in your target directory to hold the new
material you are copying.
In this example, a copy of the dir1 directory and all its contents will be created in the /flash directory.
->cp -r /flash/dir1 /flash/dir2