B-8
Cisco Catalyst Blade Switch 3120 for HP Software Configuration Guide
OL-12247-01
Appendix B Working with the Cisco IOS File System, Configuration Files, and Software Images
Working with the Flash File System
This example shows how to create a file. This command writes the contents of the new-configs directory
on the local flash device to a file named saved. on the TFTP server at 172.20.10.30:
Switch#
archive /create tftp:172.20.10.30/saved. flash:/new-configs
This example shows how to display the contents of a switch file that is in flash memory:
Switch#
archive /table flash:cbs31x0-universal-mz.122-40.EX.
info (219 bytes)
cbs31x0-universal-mz.122-40.EX/ (directory)
cbs31x0-universal-mz.122-40.EX/html/ (directory)
cbs31x0-universal-mz.122-40.EX/html/foo.html (0 bytes)
cbs31x0-universal-mz.122-40.EX/cbs31x0-universal-mz.122-40.EX.bin (610856 bytes)
cbs31x0-universal-mz.122-40.EX/info (219 bytes)
This example shows how to display only the /html directory and its contents:
Switch#
archive /table flash: cbs31x0-universal-mz.122-40/html
cbs31x0-universal-mz.122-40.EX/html
cbs31x0-universal-mz.122-40.EX/html/ (directory)
cbs31x0-universal-mz.122-40.EX/html/const.htm (556 bytes)
cbs31x0-universal-mz.122-40.EX/html/xhome.htm (9373 bytes)
cbs31x0-universal-mz.122-40.EX/html/menu.css (1654 bytes)
<output truncated>
This example shows how to extract the contents of a file located on the TFTP server at 172.20.10.30.
Switch#
archive /xtract tftp:/172.20.10.30/saved. flash:/new-configs
This example shows how to display the contents of a configuration file on a TFTP server:
Switch#
more tftp://serverA/hampton/savedconfig
!
! Saved configuration on server
!
version 12.2
service timestamps log datetime localtime
Step 3
archive /xtract source-url
flash:/file-url [dir/file...]
Extract a file into a directory on the flash file system.
For source-url, specify the source URL alias for the local file system. The
-filename. is the file from which to extract files. These options are supported:
•
local flash file system syntax:
flash:
•
FTP syntax:
ftp:[[//username[:password]@location]/directory]/-filename.
•
RCP syntax:
rcp:[[//username@location]/directory]/-filename.
•
TFTP syntax:
tftp:[[//location]/directory]/-filename.
For flash:/file-url [dir/file...], specify the location on the local flash file system
from which the file is extracted. Use the dir/file... option to specify a list of files
or directories within the file to be extracted. If none are specified, all files and
directories are extracted.
Step 4
more [/ascii | /binary | /ebcdic]
file-url
Display the contents of any readable file, including a file on a remote file
system.
Command
Purpose