File and Directory Management
Changing Directories
Use the
cd
command to navigate within the file directory structure. The
"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
your current directory will move up one directory level. If you enter
directory will move to the top of the tree. The following example shows the
current directory is /flash/certified.
->pwd
/flash/certified
-> cd
->
To verify that your current directory has moved up the directory tree, use the
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
effect on the location of your login. In other words, if you use
your current directory will remain /flash after you execute the
Making a New Directory
To make a new directory use the
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
page 2-8
cd
command. Enter cd .. without specifying a directory name and
mkdir
command. You may specify a path for the new directory. Other-
OmniSwitch AOS Release 7 Switch Management Guide
Managing System Files
cd
command allows you to move
cd
without the dots, your current
cd
command used where the
pwd
command to display
cd
command will have no
cd
while your current directory is /flash,
cd
command.
March 2011