The file system is based on a DOS file system In the 7750 SR-Series, each control processor can have up to three compact flash devices numbered one through three. The names for these devices are:
The above device names are relative device names as they refer to the devices local to the control processor with the current console session. As in the DOS file system, the colon (“:”) at the end of the name indicates it is a device.
The compact flash devices on the 7750 SR routers are removable and have an administrative state (shutdown/no shutdown).
The arguments for the SR OS file commands are modeled after standard universal resource locator (URL). A URL refers to a file (a
file-url) or a directory (a
directory-url).
The SR OS supports operations on both the local file system and on remote files. For the purposes of categorizing the applicability of commands to local and remote file operations, URLs are divided into three types of URLs: local, ftp and tftp. The syntax for each of the URL types are listed in
Table 17.
SR OS supports the standard DOS wildcard characters. The asterisk (*) can represent zero or more characters in a string of characters, and the question mark (?) can represent any one character.
Example: A:ALA-1>file cf3:\ # copy test*.cfg siliconvalley
cf1:\testfile.cfg
1 file(s) copied.
A:ALA-1>file cf3:\ # cd siliconvalley
A:ALA-1>file cf3:\siliconvalley\ # dir
Volume in drive cf1 on slot A has no label.
Directory of cf3:\siliconvalley\
05/10/2006 11:32p <DIR> .
05/10/2006 11:14p <DIR> ..
05/10/2006 11:32p 7597 testfile.cfg
1 File(s) 7597 bytes.
2 Dir(s) 1082368 bytes free.
A:ALA-1>file cf3:\siliconvalley\ #
A:21# show router mpls lsp l-63-8*
===============================================================================
MPLS LSPs (Originating)
===============================================================================
LSP Name To Fastfail
Adm Opr
Config
-------------------------------------------------------------------------------
l-63-8-cc 213.224.245.8 No
Up Dwn
l-63-8-cw 213.224.245.8 No
Up Dwn
-------------------------------------------------------------------------------
LSPs : 2
===============================================================================
A:21#
All the commands can operate on the local file system. Table 18 indicates which commands also support remote file operations.
The system administrator can change the read-only attribute in the local file. Enter the attrib command with no options to display the contents of the directory and the file attributes.
Use the CLI syntax displayed below to modify file attributes:
Example:
# file
file cf3:\ # attrib
file cf3:\ # attrib +r BOF.SAV
file cf3:\ # attrib
A:ALA-1>file cf3:\ # attrib
cf3:\bootlog.txt
cf3:\bof.cfg
cf3:\boot.ldr
cf3:\bootlog_prev.txt
cf3:\BOF.SAV
A:ALA-1>file cf3:\ # attrib +r BOF.SAV
A:ALA-1>file cf3:\ # attrib
cf3:\bootlog.txt
cf3:\bof.cfg
cf3:\boot.ldr
cf3:\bootlog_prev.txt
R cf3:\BOF.SAV
Use the md command to create a new directory in the local file system, one level at a time.
Enter the cd command to navigate to different directories.
Example:
file cf1:\ # md test1
file cf1:\ # cd test1
file cf1:\test1\ # md test2
file cf1:\test1\ # cd test2
file cf1:\test1\test2\ # md test3
file cf1:\test1\test2\ # cd test3
file cf1:\test1\test2\test3 #
Use the copy command to upload or download an image file, configuration file, or other file types to or from a flash card or a TFTP server.
The scp command copies files between hosts on a network. It uses SSH for data transfer, and uses the same authentication and provides the same security as SSH.
The source file for the scp command must be local. The file must reside on the 7750 SR router. The destination file has to be of the format: user@host:file-name. The destination does not need to be local.
copy source-file-url dest-file-url [force]
scp local-file-url destination-file-url [router
router name |
service-id] [force]
Example: A:ALA-1>file cf1:\ # copy 104.cfg cf1:\test1\test2\test3\test.cfg
A:ALA-1>file cf1:\ # scp file1 admin@192.168.x.x:cf1:\file1
A:ALA-1>file cf1:\ # scp file2 user2@192.168.x.x:/user2/file2
A:ALA-1>file cf1:\ # scp cf2:/file3 admin@192.168.x.x:cf1:\file3
Use the move command to move a file or directory from one location to another.
move old-file-url new-file-url [force]
Example: A:ALA-1>file cf1:\test1\test2\test3\ # move test.cfg cf1:\test1
cf1:\test1\test2\test3\test.cfg
A:ALA-1>file cf1:\test1\test2\test3\ # cd ..
A:ALA-1>file cf1:\test1\test2\ # cd ..
A:ALA-1>file cf1:\test1\ # dir
Directory of cf1:\test1\
05/04/2006 07:58a <DIR> .
05/04/2006 07:06a <DIR> ..
05/04/2006 07:06a <DIR> test2
05/04/2006 07:58a 25278 test.cfg
1 File(s) 25278 bytes.
3 Dir(s) 1056256 bytes free.
A:ALA-1>file cf1:\test1\ #
Use the delete and
rd commands to delete files and remove directories. Directories can be removed even if they contain files and/or subdirectories. To remove a directory that contains files and/or subdirectories, use the rd
rf command. When files or directories are deleted, they cannot be recovered.
The force option deletes the file or directory without prompting the user to confirm.
A:ALA-1>file cf1:\test1\ # delete test.cfg
A:ALA-1>file cf1:\test1\ # delete abc.cfg
A:ALA-1>file cf1:\test1\test2\ # cd test3
A:ALA-1>file cf1:\test1\test2\test3\ # cd ..
A:ALA-1>file cf1:\test1\test2\ # rd test3
A:ALA-1>file cf1:\test1\test2\ # cd ..
A:ALA-1>file cf1:\test1\ # rd test2
A:ALA-1>file cf1:\test1\ # cd ..
A:ALA-1>file cf1:\ # rd test1
A:ALA-1>file cf1:\ #
Use the dir command to display a list of files on a file system.
The
type command displays the contents of a file.
The
version command displays the version of a *.tim file.
A:ALA-1>file cf1:\ # dir
Volume in drive cf1 on slot A has no label.
Directory of cf1:\
01/01/1980 12:00a 7597 test.cfg
01/01/1980 12:00a 957 b.
08/19/2001 02:14p 230110 BOOTROM.SYS
01/01/1980 12:00a 133 NVRAM.DAT
04/03/2003 05:32a 1709 103.ndx
01/28/2003 05:06a 1341 103.cftg.ndx
01/28/2003 05:06a 20754 103.cftg
04/05/2003 02:20a <DIR> test
15 File(s) 338240 bytes.
3 Dir(s) 1097728 bytes free.
A:ALA-1>file cf1:\ # type fred.cfg
# Saved to /cflash1/fred.cfg
# Generated THU FEB 21 01:30:09 2002 UTC
exit all
config
#------------------------------------------
# Chassis Commands
#------------------------------------------
card 2 card-type faste-tx-32
exit
#------------------------------------------
# Interface Commands
#------------------------------------------
# Physical port configuration
interface faste 2/1
shutdown
mode network
exit
interface faste 2/2
shutdown
exit
interface faste 2/3
shutdown
exit
interface faste 2/4
A:ALA-1>file cf1:\ # version boot.tim
TiMOS-L-1.0.B3-8
A:ALA-1>file cf1:\ #
A:ALA-1>file cf3:\ # repair
Checking drive cf3: on slot A for errors...
Drive cf31: on slot A is OK.