File System Command Reference

Command Hierarchy

Configuration Commands

attrib [+r | -r] file-url
attrib
cd [file-url]
copy source-file-url dest-file-url [force]
delete file-url [force]
dir [file-url]
format [cflash-id] [reliable]
md file-url
move old-file-url new-file-url [force]
rd file-url [force]
repair [cflash-id]
scp local-file-url destination-file-url [router router-instance] [force]
[no] shutdown [active] [standby]
[no] shutdown cflash-id
type file-url
version file-url [check]

Command Descriptions

Configuration Commands

file

Syntax 
file
Context 
root
Description 

This command enters the context to perform file system operations.

When entering the file context, the prompt changes to reflect the present working directory. Navigating the file system with the cd .. command results in a changed prompt.

The exit all command leaves the file system/file operation context and returns to the <ROOT> CLI context. The state of the present working directory is maintained for the CLI session. Entering the file command returns the cursor to the working directory where the exit command was issued.

attrib

Syntax 
attrib [+r | -r] file-url
attrib
Context 
file
Description 

This command sets or clears/resets the read-only attribute for a file in the local file system.

To list all files and their current attributes, enter attrib or attrib x where x is either the filename or a wildcard (*).

When an attrib command is entered to list a specific file or all files in a directory, the file’s attributes are displayed with or without an “R” preceding the filename. The “R” implies that the +r is set and that the file is read-only. Files without the “R” designation imply that the -r is set and that the file is read-write-all. For example:

     ALU-1>file cf3:\ # attrib
               cf3:\bootlog.txt
               cf3:\bof.cfg
               cf3:\boot.ldr
               cf3:\sr1.cfg
               cf3:\test
               cf3:\bootlog_prev.txt
          R    cf3:\BOF.SAV
Parameters 
file-url—
the URL for the local file
Values—
local-url | remote-url:     up to 255 characters
local-url:                           [cflash-id/][file-path]
remote-url:                        [ftp://login:pswd@remote-locn/]                                             [file-path]
The 7705 SAR-8 and the 7705 SAR-18 support cf3:, cf3-A:, and cf3-B:.
In addition, the 7705 SAR-18 supports cf1:, cf1-A:, cf1-B:, cf2:, cf2-A:, and cf2-B:.
The 7705 SAR-F, 7705 SAR-H, 7705 SAR-Hc, 7705 SAR-W, and all variants of the 7705 SAR-M, 7705 SAR-A, and 7705 SAR-Wx support cf3: and cf3-A:.
+r—
sets the read-only attribute on the specified file
-r—
clears/resets the read-only attribute on the specified file

cd

Syntax 
cd [file-url]
Context 
file
Description 

This command displays or changes the current working directory in the local file system.

Parameters 
file-url—
the URL for the local file
Values—
local-url | remote-url:     up to 255 characters
local-url:                           [cflash-id/][file-path]
remote-url:                        {[ftp:// | tftp://}login:pswd@remote-                                             locn/] [file-path]
The 7705 SAR-8 and the 7705 SAR-18 support cf3:, cf3-A:, and cf3-B:.
In addition, the 7705 SAR-18 supports cf1:, cf1-A:, cf1-B:, cf2:, cf2-A:, and cf2-B:.
The 7705 SAR-F, 7705 SAR-H, 7705 SAR-Hc, 7705 SAR-W, and all variants of the 7705 SAR-M, 7705 SAR-A, and 7705 SAR-Wx support cf3: and cf3-A:.
<none>—
displays the current working directory
..—
signifies the parent directory. This can be used in place of an actual directory name in a directory-url.
directory-url—
the destination directory

copy

Syntax 
copy source-file-url dest-file-url [force]
Context 
file
Description 

This command copies a file or all files in a directory from a source URL to a destination URL. At least one of the specified URLs should be a local URL. The optional wildcard (*) can be used to copy multiple files that share a common (partial) prefix and/or (partial) suffix.

When a file is copied to a destination with the same file name, the original file is overwritten by the new file specified in the operation. The following prompt appears if the destination file already exists:

“Overwrite destination file (y/n)?”

For example:

To copy a file named srcfile in a directory called test on cf3: in slot CSM B to a file called destfile in a directory called production on cf3: in slot CSM A, the syntax is:

file cf3:\ # copy cf3-B:/test/srcfile cf3-A:/production/destfile

To FTP a file named 121201.cfg in directory mydir stored on cf3: in slot CSM A to a network FTP server with IP address 131.12.31.79 in a directory called backup with a destination file name of 121201.cfg, the FTP syntax is:

copy cf3-A:/mydir/121201.cfg 131.12.31.79/backup/121201.cfg
Parameters 
source-file-url—
the location of the source file or directory to be copied (see file-url)
dest-file-url—
the destination of the copied file or directory (see file-url)
force—
forces an immediate copy of the specified file(s)

       file copy force executes the command without displaying a user prompt message

file-url—
the local or remote URL (local-url or remote-url). When entering an ipv6-address, the following items are mandatory:
  1. enclose the IPv6 address in square brackets (“[“ and “]”); for example, user345@[3100::A78:82A3]
  2. include “-interface” for the link local addresses; otherwise, “-interface” is omitted
    For example, if the login:pswd is admin:admin and the IPv6 hostname consists of FE80::9876:DEEF:154D along with the link local interface “ies1_chicago”, then the full command would be (note the “-” between the ipv6-address and the interface):
    file copy cf3:\bof.cfg.1 ftp://admin:admin@ [FE80::9876:DEEF:154D-ies1_chicago]/cf3:/file2
Values—
local-url:      cflash-id/file-path
                     200 characters maximum, including cflash-id
                     directory length 99 characters maximum each
      cflash-id  cf1: | cf1-A: | cf1-B: | cf2: | cf2-A: |
                      cf2-B: | cf3: | cf3-A: | cf3-B:
remote-url:   {ftp:// | tftp://}login:pswd@remote-locn/file-path
                     255 characters maximum
                     directory length 99 characters maximum each
      remote-locn:   hostname | ipv4-address | ipv6-address
               hostname:          the host name of the remote location,
                                          128 characters maximum
               ipv4-address:     a.b.c.d
               ipv6-address:     x:x:x:x:x:x:x:x[-interface]
                                          x:x:x:x:x:x:d.d.d.d[-interface]
                                          x: [0..FFFF]H
                                          d: [0..255]D
                                          interface: the interface name,                                                   32 characters maximum,                                                   mandatory for link local                                                   addresses

delete

Syntax 
delete file-url [force]
Context 
file
Description 

This command deletes the specified file.

The optional wildcard “*” can be used to delete multiple files that share a common (partial) prefix and/or (partial) suffix. When the wildcard is entered, the following prompt displays for each file that matches the wildcard:

“Delete file <filename> (y/n)?”

Parameters 
file-url—
the file name to delete
Values—
local-url | remote-url:          up to 255 characters
local-url:                                [cflash-id/][file-path]
remote-url                              [ftp://login:pswd@remote-locn/]                                                  [file-path]
The 7705 SAR-8 and the 7705 SAR-18 support cf3:, cf3-A:, and cf3-B:.
In addition, the 7705 SAR-18 supports cf1:, cf1-A:, cf1-B:, cf2:, cf2-A:, and cf2-B:.
The 7705 SAR-F, 7705 SAR-H, 7705 SAR-Hc, 7705 SAR-W, and all variants of the 7705 SAR-M, 7705 SAR-A, and 7705 SAR-Wx support cf3: and cf3-A:.
force—
forces an immediate deletion of the specified file(s)

       file delete * force deletes all the wildcard matching files without displaying a user prompt message

dir

Syntax 
dir [file-url]
Context 
file
Description 

This command displays a list of files and subdirectories in a directory.

Parameters 
file-url—
the path or directory name

Use the file-url with the optional wildcard (*) to reduce the number of files to list.

Values—
lists all files in the present working directory

format

Syntax 
format [cflash-id] [reliable]
Context 
file
Description 

This command formats the compact flash. The compact flash must be shut down before formatting.

Parameters 
cflash-id—
the compact flash type
Values—
The 7705 SAR-8 and the 7705 SAR-18 support cf3:, cf3-A:, and cf3-B:.
In addition, the 7705 SAR-18 supports cf1:, cf1-A:, cf1-B:, cf2:, cf2-A:, and cf2-B:.
The 7705 SAR-F, 7705 SAR-H, 7705 SAR-Hc, 7705 SAR-W, and all variants of the 7705 SAR-M, 7705 SAR-A, and 7705 SAR-Wx support cf3: and cf3-A:.
reliable—
enables the reliance file system and disables the default DOS file system. This option is valid only on compact flashes 1 and 2.

md

Syntax 
md file-url
Context 
file
Description 

This command creates a new directory in a file system.

Directories can only be created one level at a time.

Parameters 
file-url—
the directory name to be created
Values—
local-url | remote-url:          up to 255 characters
local-url:                                [cflash-id/][file-path]
remote-url:                             [ftp://login:pswd@remote-locn/]                                                  [file-path]
The 7705 SAR-8 and the 7705 SAR-18 support cf3:, cf3-A:, and cf3-B:.
In addition, the 7705 SAR-18 supports cf1:, cf1-A:, cf1-B:, cf2:, cf2-A:, and cf2-B:.
The 7705 SAR-F, 7705 SAR-H, 7705 SAR-Hc, 7705 SAR-W, and all variants of the 7705 SAR-M, 7705 SAR-A, and 7705 SAR-Wx support cf3: and cf3-A:.

move

Syntax 
move old-file-url new-file-url [force]
Context 
file
Description 

This command moves a local file, system file, or a directory. If the target already exists, the command fails and an error message displays.

The following prompt appears if the destination file already exists:

“Overwrite destination file (y/n)?”

Parameters 
old-file-url—
the file or directory to be moved
Values—
local-url | remote-url:          up to 255 characters
local-url:                                [cflash-id/][file-path]
remote-url:                             [ftp://login:pswd@remote-locn/]                                                  [file-path]
The 7705 SAR-8 and the 7705 SAR-18 support cf3:, cf3-A:, and cf3-B:.
In addition, the 7705 SAR-18 supports cf1:, cf1-A:, cf1-B:, cf2:, cf2-A:, and cf2-B:.
The 7705 SAR-F, 7705 SAR-H, 7705 SAR-Hc, 7705 SAR-W, and all variants of the 7705 SAR-M, 7705 SAR-A, and 7705 SAR-Wx support cf3: and cf3-A:.
new-file-url—
the new destination to place the old-file-url
Values—
local-url | remote-url:          255 chars max
local-url:                                [cflash-id/][file-path]
remote-url:                             [ftp://login:pswd@remote-locn/]                                                  [file-path]
The 7705 SAR-8 and the 7705 SAR-18 support cf3:, cf3-A:, and cf3-B:.
In addition, the 7705 SAR-18 supports cf1:, cf1-A:, cf1-B:, cf2:, cf2-A:, and cf2-B:.
The 7705 SAR-F, 7705 SAR-H, 7705 SAR-Hc, 7705 SAR-W, and all variants of the 7705 SAR-M, 7705 SAR-A, and 7705 SAR-Wx support cf3: and cf3-A:.
force—
forces an immediate move of the specified file(s)

       file move force executes the command without displaying a user prompt message

rd

Syntax 
rd file-url [force]
Context 
file
Description 

This command removes (deletes) a directory in a file system. The following message displays:

Are you sure (y/n)?

Parameters 
file-url—
the directory to be removed
Values—
local-url | remote-url:            up to 255 characters
local-url:                                  [cflash-id/][file-path]
remote-url:                               [ftp://login:pswd@remote-locn]                                                    [file-path]
The 7705 SAR-8 and the 7705 SAR-18 support cf3:, cf3-A:, and cf3-B:.
In addition, the 7705 SAR-18 supports cf1:, cf1-A:, cf1-B:, cf2:, cf2-A:, and cf2-B:.
The 7705 SAR-F, 7705 SAR-H, 7705 SAR-Hc, 7705 SAR-W, and all variants of the 7705 SAR-M, 7705 SAR-A, and 7705 SAR-Wx support cf3: and cf3-A:.
force—
forces an immediate deletion of the specified directory

       rd file-url force executes the command without displaying a user prompt message

repair

Syntax 
repair [cflash-id]
Context 
file
Description 

This command checks a compact flash device for errors and repairs any errors found.

Parameters 
cflash-id—
the compact flash slot ID to be shut down or enabled. When a specific cflash-id is specified, then that drive is shut down. If no cflash-id is specified, the drive referred to by the current working directory is assumed. If a slot number is not specified, then the active CSM is assumed.
Values—
The 7705 SAR-8 and the 7705 SAR-18 support cf3:, cf3-A:, and cf3-B:.
In addition, the 7705 SAR-18 supports cf1:, cf1-A:, cf1-B:, cf2:, cf2-A:, and cf2-B:.
The 7705 SAR-F, 7705 SAR-H, 7705 SAR-Hc, 7705 SAR-W, and all variants of the 7705 SAR-M, 7705 SAR-A, and 7705 SAR-Wx support cf3: and cf3-A:.
Values—
the current compact flash device

scp

Syntax 
scp local-file-url destination-file-url [router router-instance] [force]
Context 
file
Description 

This command copies a local file to a remote host file system. It uses ssh for data transfer, and uses the same authentication and provides the same security as ssh. When the command is entered, the following prompt appears:

“Are you sure (y/n)?”

The destination must specify a user and a host.

Parameters 
local-file-url—
the local source file or directory
Values—
[cflash-id/]file-path: 200 characters maximum
   cflash-id:    cf1: | cf1-A: | cf1-B: | cf2: | cf2-A: | cf2-B: | cf3: |                       cf3-A: | cf3-B:
   file-path:    the local file path, 200 characters maximum,                      directory length is 99 characters maximum each
destination-file-url—
the destination file. When entering an ipv6-address, the following items are mandatory:
  1. enclose the IPv6 address in square brackets (“[” and “]”); for example, user345@[3100::A78:82A3]
  2. include “-interface” for the link local addresses; otherwise,“-interface” is omitted.
    For example, if the user is admin and the IPv6 hostname consists of FE80::9876:DEEF:l54D along with the link local interface “ies1_chicago”, then the full command would be (note the “-” between the ipv6-address and the interface):
    file scp cf3:/myfile admin@[FE80::9876:DEEF:154D-ies1_chicago]:cf3:/file2 router Base
Values—
user@hostname:file-path     255 characters maximum
   user:                    the SSH user, 32 characters maximum
   hostname:            dns-name | ipv4-address | “[”ipv6-address “]”
      dns-name:         128 characters maximum
      ipv4-address:    a.b.c.d
      ipv6-address:    x:x:x:x:x:x:x:x[-interface]
                                x:x:x:x:x:x:d.d.d.d[-interface]
                                x:  [0..FFFF]H
                                d:  [0..255]D
                                interface:  the interface name, 32 characters                                                   maximum, mandatory for link                                                   local addresses
   file-path:    the destination file path, 200 characters maximum,                        directory length is 99 characters maximum each
router-instance—
specifies the router name or service ID
Values—
router-name:     Base, management
service-id:         1 to 2147483647
Values—
Base
force—
forces an immediate copy of the specified file

file scp local-file-url destination-file-url [router router-instance] force executes the command without displaying a user prompt message

shutdown

Syntax 
[no] shutdown [active] [standby]
[no] shutdown cflash-id
Context 
file
Description 

This command shuts down (unmounts) the specified CSM(s).

Use the no shutdown [active] [standby] command to enable one or both CSMs.

Use the no shutdown cflash-id command to enable a compact flash (cf3: on all platforms; cf1: or cf2: on the 7705 SAR-18) on the CSM. The no shutdown command can be issued for a specific slot when no compact flash is present. When a compact flash is installed in the slot, the device will be activated upon detection.

In redundant systems, use the no shutdown command on cf3: on both CSMs in order to facilitate synchronization. See the synchronize command in the configure>redundancy context.

The shutdown command must be issued prior to removing a compact flash. If no parameters are specified, the drive referred to by the current working directory will be shut down.

LED status indicators — The following states are possible for the compact flash:

Operational: If a compact flash is present in a drive and operational (no shutdown), the respective LED is lit green. The LED flickers when the compact flash is accessed. Do not remove the compact flash during a read/write operation.

State:                        admin = up, operational = up, equipped

Flash defective: If a compact flash is defective, the respective LED blinks amber to reflect the error condition and a trap is raised.

State:                        admin = up/down, operational = faulty, equipped = no

Flash drive shut down: When the compact flash drive is shut down and a compact flash is present, the LED is lit amber. In this state, the compact flash can be ejected.

State:                        admin = down, operational = down, equipped = yes

No compact flash present, drive shut down: If no compact flash is present and the drive is shut down, the LED is unlit.

State:                        admin = down, operational = down, equipped = no

No compact flash present, drive enabled: If no compact flash is present and the drive is not shut down, the LED is unlit.

State:                        admin = up, operational = down, equipped = no

Ejecting a compact flash: The compact flash drive should be shut down before ejecting a compact flash. The LED should turn to solid (not blinking) amber. This is the only way to safely remove the compact flash. If a compact flash drive is not shut down before a compact flash is ejected, the LED blinks amber for approximately 5 s before shutting off.

State:                        admin = down, operational = down, equipped = yes

The shutdown or no shutdown state is not saved in the configuration file. Following a reboot, all compact flash drives are in their default state.

Default 

no shutdown — compact flash device is administratively enabled

Parameters 
cflash-id—
the compact flash slot ID to be shut down or enabled. If a cflash-id is specified, the drive is shut down or enabled. If no cflash-id is specified, the drive referred to by the current working directory is assumed. If a slot number is not specified, the active CSM is assumed.
Values—
The 7705 SAR-8 and the 7705 SAR-18 support cf3:, cf3-A:, and cf3-B:.
In addition, the 7705 SAR-18 supports cf1:, cf1-A:, cf1-B:, cf2:, cf2-A:, and cf2-B:.
The 7705 SAR-F, 7705 SAR-H, 7705 SAR-Hc, 7705 SAR-W, and all variants of the 7705 SAR-M, 7705 SAR-A, and 7705 SAR-Wx support cf3: and cf3-A:.
active—
all drives on the active CSM are shut down or enabled
standby—
all drives on the standby CSM are shut down or enabled

If both active and standby keywords are specified, all drives on both CSMs are shut down or enabled.

type

Syntax 
type file-url
Context 
file
Description 

This command displays the contents of a text file.

Parameters 
file-url—
the file contents to display

version

Syntax 
version file-url [check]
Context 
file
Description 

This command displays the version of a -TiMOS both.tim file.

Parameters 
file-url—
the file name of the target file
Values—
local-url | remote-url:            up to 255 characters
local-url:                                [cflash-id/][file-path]
remote-url:                            {[ftp:// | tftp://]login:pswd@remote-                                                 locn/][file-path]
cflash-id:                                The 7705 SAR-8 and the 7705 SAR-18 support cf3:, cf3-A:, and cf3-B:.
In addition, the 7705 SAR-18 supports cf1:, cf1-A:, cf1-B:, cf2:, cf2-A:, and cf2-B:.
The 7705 SAR-F, 7705 SAR-H, 7705 SAR-Hc, 7705 SAR-W, and all variants of the 7705 SAR-M, 7705 SAR-A, and 7705 SAR-Wx support cf3: and cf3-A:.
check—
validates the .tim file
Output 

The following example shows the version of a -TiMOS both.tim file.

Sample Output
A:ALU-1# file version cf3:/both.tim
TiMOS-B-0.0.R1 for ALCATEL-LUCENT SAR 7705
A:ALU-1# file version ftp://timos:timos@xxx.xxx.xx.xx/./both.tim check
Validation successful
TiMOS-I-0.0.R1 for ALCATEL-LUCENT SAR 7705
B:Performance#