[Contents] [Prev] [Next] [Index] [Report an Error]


Managing Files

You are responsible for file management. Table 4-1 shows the types of system files and their corresponding extensions.

Table 4-1 Types of system files and corresponding extensions 
Type of File
Extension
Description
Configuration
*.cnf
Snapshot of the system's configuration
Core dump
*.dmp
File you can create for troubleshooting if a module fails
History
*.hty (reboot.hty)
Details of when and why modules rebooted
Log
*.log
A series of messages that describe events that occurred on the system
Macro
*.mac
A macro program
Release
*.rel
Software releases you can install in the system
Script
*.scr
A sequence of CLI commands. When you run a script file, the system executes the commands as though they were entered at the terminal
Secure Shell (SSH) Server public key
*.pub
Host key for the SSH server
Statistics
*.sts
Bulk statistics created when you run the bulkstats commands
Text
*.txt
Text file

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:

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 on transferring files between locations, see Transferring Files later in this chapter.

In order 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 ERX system 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 later in this chapter), you can manage files on the user space from an FTP client on a network host. Table 4-2 lists the FTP protocol commands that the ERX system supports. Whether you can perform these functions on the user space depends on the features that the FTP client offers.

Table 4-2 FTP protocol commands that the system supports 
FTP Protocol Command
Function
HELP
List supported commands.
USER
Verify user name.
PASS
Verify password for the user.
QUIT
Quit the session.
LIST
List contents of a directory.
NLST
List directory contents using a concise format.
RETR
Retrieve a file.
STOR
Store a file.
CWD
Change working directory.
CDUP
Change working directory to parent.
TYPE
Change the data representation type.
PORT
Change the port number.
PWD, XPWD
Get the name of current working directory.
STRU
Change file structure settings (only stream mode supported).
MODE
Change file transfer mode (only stream mode supported).
PASV
Make the server listen on a port for data connection.
NOOP
Do nothing.
DELE
Delete a file.
MKD, XMKD
Make directory.
RMD, XRMD
Remove directory.
RNFR
Rename from (i.e., "from half" of file or directory rename)
RNTO
Rename to (i.e., "to half" of file or directory rename)

File Commands and FTP Servers

Commands—copy, configure file, and macro—that invoke a remote FTP server take place in the context of the current virtual router rather than the default VR. 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 4-3 shows the types of files you can rename in different locations.

    rename

host1#rename boston1.cnf boston2.cnf 

Table 4-3 File types you can rename 
Destination
Source
System Space
User Space
(linked files and unlinked files)
Network Host Within a Firewall
Standby SRP Module
System
*.cnf
*.dmp
*.hty
*.log
*.mac
*.rel
*.scr
*.txt
Nonsystem files
*.cnf
*.dmp
*.hty
*.log
*.mac
*.scr
*.txt
*.sts
None
User Space
*.cnf
*.hty (excluding reboot.hty)
*.log (excluding system.log)
*.mac
*.scr
*.txt
*.cnf
*.dmp
*.hty
*.log
*.mac
*.pub
*.rel
*.scr
*.sts
*.txt
Nonsystem files
None
None
Network Host Within a Firewall
None
None
None
None
Standby SRP Module
None
None
None
None

Deleting Files

Use the delete command to delete files in NVS. Table 4-4 shows the types of files you can delete in different locations.

    delete

host1#delete test.scr
host1#delete /outgoing/test.scr

Table 4-4 File types you can delete 
Location
System Space
User Space
(linked files and unlinked files)
Network Host Within a Firewall
Standby SRP Module
*.cnf
*.dmp
*.hty
*.log
*.mac
*.rel
*.scr
*.sts
*.txt
*.cnf
*.dmp
*.hty
*.log
*.mac
*.pub
*.rel
(deletes *.rel file only and not associated files)
*.scr
*.sts
*.txt
Nonsystem files
None
None

Monitoring Files

Use the dir command to view files in NVS.

    dir



Note: If you issue the dir command from Boot mode, existing .scr and .mac files are not displayed.

host1#dir
                             unshared                         in
    file            size       size         date (UTC)        use
-------------     --------   --------   -------------------   ---
/incoming <DIR>   38023824              12/19/2000 07:13:00
/outgoing <DIR>       3584              12/19/2000 07:13:00
reboot.hty            5632       5632   12/20/2000 10:01:40
3-0-0a3-7.rel     38797998   38797998   12/20/2000 23:40:46    !
test.scr              1204       1204   12/18/2000 03:01:04

Capacity = 220200960, Bytes Free = 120616448, Reserved = 36700160

host1#dir /incoming
                           unshared                         in
    file          size       size         date (UTC)        use
-------------   --------   --------   -------------------   ---
3-0-0a3-7.rel        256         0    12/19/2000 07:14:01
srp.exe         30012312         0    12/19/2000 07:14:12
srpIc.exe        1801208         0    12/19/2000 07:20:32
srpDiag.exe      6984222         0    12/19/2000 07:22:08

Capacity = 220200960, Bytes Free = 120616448, Reserved = 36700160

host1#dir /outgoing
                           unshared                         in
    file          size       size         date (UTC)        use
-------------   --------   --------   -------------------   ---
test.scr            1204          0   12/18/2000 03:01:04
foo.scr             1278       1278   12/20/2000 04:02:12

Capacity = 220200960, Bytes Free = 120616448, Reserved = 36700160

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

host1#more erxconfig.txt
host1#more standby:mysetup.mac
host1#more fileserver1:/startup/scripts/myconfig.scr


[Contents] [Prev] [Next] [Index] [Report an Error]