Managing Files
You are responsible for file management. Table 31 shows the types of system files and their corresponding extensions.
System files may reside in four locations:
The system space contains files for system operation. For example, the current software configuration is stored in the system space.
The user space is reserved for FTP server operations and has the typical directory structure of a secure FTP server. The root or top level directory is a read-only directory that contains two subdirectories:
- /incomingRead-write directory to and from which an FTP client can send and retrieve files.
- /outgoingRead-only directory from which an FTP client can retrieve files.
Users can transfer files through FTP to the user space from a network host and vice versa. However, users cannot access the system space through FTP. To install a file from the user space to the system space, use the copy command. For detailed information about transferring files between locations, see Transferring Files.
To conserve NVS and minimize the installation time, files are not stored in both the system space and the user space. When you issue the copy command to install a file from user space to system space, the E-series router establishes a link to the file, but does not make a physical copy.
Managing the User Space from a Network Host
If you enable the system's FTP server (see Configuring the FTP Server), you can manage files on the user space from an FTP client on a network host. Table 32 lists the FTP protocol commands that the E-series router supports. Whether you can perform these functions on the user space depends on the features that the FTP client offers.
Change file structure settings (only stream mode supported).
File Commands and FTP Servers
Commandscopy, configure file, and macrothat invoke a remote FTP server take place in the context of the current virtual router rather than the default virtual router. You must configure the remote FTP server so that any traffic destined for the virtual router can reach the virtual router; typically, you configure the FTP server to reach the default address of the system, which will always be able to reach the virtual router.
Renaming Files
To rename files, use the rename command. Table 33 shows the types of files you can rename in different locations.
rename
host1#rename boston1.cnf boston2.cnfThere is no no version.
Deleting Files
Use the delete command to delete files in NVS. Table 34 shows the types of files you can delete in different locations.
delete
- Use to delete files in NVS.
- To delete a file in user space, specify the incoming or outgoing directory on the FTP server.
- You can specify the name of a subdirectory in the incoming or outgoing directory.
- Examples
host1#delete test.scrhost1#delete /outgoing/test.scrThere is no no version.
Monitoring Files
Use the dir command to view files in NVS.
dir
- Use to show a list of files in NVS.
- Specify a directory path to view files in the user space.
- Bulk statistics .sts files are stored in volatile storage on a RAM disk, and are displayed only when bulkstats is configured.
NOTE: When you issue the dir command from Boot mode, a reduced set of file types is displayed.
- Field descriptions
- fileName of file or directory (DIR indicates a directory)
- sizePhysical size of file
- unshared sizeSize of file in user space
- Value of zero indicates that this file has been installed onto the system space and that there is a link to this file.
- Value other than zero indicates that the file has not been installed onto the system space and equals the physical size of the file.
- dateDate that file was created
- in useAn exclamation point (!) indicates that the system is using this file
host1#dirunshared infile size size date (UTC) use------------- -------- -------- ------------------- ---disk0:/incoming <DIR> 38023824 12/19/2000 07:13:00disk0:/outgoing <DIR> 3584 12/19/2000 07:13:00disk0:reboot.hty 5632 5632 12/20/2000 10:01:40disk0:3-0-0a3-7.rel 38797998 38797998 12/20/2000 23:40:46 !disk0:test.scr 1204 1204 12/18/2000 03:01:04disk0:bulkstats.scr 170 170 02/13/2006 17:34:30ram:bulkstats1.sts 737 737 03/07/2006 09:07:52Disk capacity-------------Capacity Free ReservedDevice (bytes) (bytes) (bytes)------ ---------- --------- --------disk0: 1025482752 342066375 68157440ram: 5767168 5734400 0Example 2 host1#dir /incomingunshared infile size size date (UTC) use------------- -------- -------- ------------------- ---disk0:3-0-0a3-7.rel 256 0 12/19/2000 07:14:01disk0:srp.exe 30012312 0 12/19/2000 07:14:12disk0:srpIc.exe 1801208 0 12/19/2000 07:20:32disk0:srpDiag.exe 6984222 0 12/19/2000 07:22:08Disk capacity-------------Capacity Free ReservedDevice (bytes) (bytes) (bytes)------ ---------- --------- --------disk0: 220200960 120616448 36700160Example 3 host1#dir /outgoingunshared infile size size date (UTC) use------------- -------- -------- ------------------- ---disk0:test.scr 1204 0 12/18/2000 03:01:04disk0:foo.scr 1278 1278 12/20/2000 04:02:12Disk capacity-------------Capacity Free ReservedDevice (bytes) (bytes) (bytes)------ ---------- --------- --------disk0: 220200960 120616448 36700160There is no no version. Viewing Files
Use the more command to display the contents of a macro, script, or text file. The file can reside in NVS on the primary SRP module, in NVS on the redundant (standby) SRP module, or on a remote server that you access using FTP.
more
- Use to display the contents of a macro, script, or text file that resides in NVS on the primary SRP module, in NVS on the redundant SRP module, or on a remote server that you access using FTP.
- Specify the file you want to display using one of the following formats, depending on the location of the file:
- fileNameName of the file that resides in NVS on the primary SRP module
- standby:fileNameName of the file that resides in NVS on the redundant (standby) SRP module
- serverName:filePathNameName of the remote server on which the file resides and the complete pathname of the file
- Example 1Displays the contents of a text file named erxconfig.txt that resides in NVS on the primary SRP module
host1#more erxconfig.txtExample 2Displays the contents of a macro file named mysetup.mac that resides in NVS on the redundant (standby) SRP module host1#more standby:mysetup.macExample 3Displays the contents of a script file named myconfig.scr that resides on a remote server named fileserver1 host1#more fileserver1:/startup/scripts/myconfig.scrThere is no no version.