User guide
File and Directory Management Managing System Files
page 2-12 OmniSwitch 7700/7800/8800 Switch Management Guide April 2006
Displaying Directory Contents Including Subdirectories
The ls -r command displays the contents of your current directory and associated subdirectories and files
contained therein. The following example shows the result of the ls -r command where the /flash/working
directory contains a directory named newdir1. Be sure to include a space between ls and -r.
-> ls -r /flash/working
Listing Directory /flash/working:
drw 2048 April 14 17:14 ./
drw 2048 April 14 17:12 ../
drw 2048 April 14 17:14 newdir1/
-rw 2636 April 12 11:16 boot.cfg
-rw 123574 April 14 10:54 Fsecu.img
-rw 123574 April 14 10:54 Fbase.img
-rw 123574 April 14 10:54 Fos.img
Listing Directory /flash/working/newdir:
drw 2048 April 14 17:14 ./
drw 2048 April 14 17:14 ../
Copying an Existing Directory
The cp -r command recursively 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 direc-
tory to hold the new material you are copying. In this example, a copy of the working directory and all its
contents will be created in the certified directory. The destination directory must exist before the cp -r
command will work.
->cp -r /flash/working flash/certified/working
Note. Your login account must have write privileges to execute the cp -r command.
Flash Directory
Working Directory
(Files)
boot.cfg
newdir1 Directory
Certified Directory
Working Directory
(Files)
newdir1 Directory
(Files)
boot.cfg
F12eth.img
Fos.img
Frelease.img
Fsecu.img
F12eth.img
Fbase.img
Fsecu.img
Fweb.img
boot.cfg
F12eth.img
Fbase.img
Fsecu.img
Fweb.img