3.3. File Command Reference

3.3.1. Command Hierarchy

3.3.1.1. 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] [sort-order {d | n | s}] [reverse]
format cflash cflash-id [reliable]
md file-url
move old-file-url new-file-url [force]
rd file-url rf [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]

3.3.2. Command Descriptions

3.3.2.1. Configuration Commands

3.3.2.1.1. File System Commands

shutdown

Syntax 
[no] shutdown [cflash-id]
Context 
file
Supported Platforms 

Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode

Description 

This command disables the drive. This command is available for use only with removable storage drives. The removable storage drives differ among the 7210 SAS platforms. It cannot be used with the internal non-removable compact flash.

The no form of this command enables the drive.

Default 

no shutdown

Parameters 
cflash-id—
Specifies the device identifier.
Values—
uf1: (7210 SAS-M)
cf1:, cf2:, uf1: (7210 SAS-T, 7210 SAS-Sx/S 1/10GE: standalone and standalone-VC, 7210 SAS-Sx 10/100GE, and 7210 SAS-Mxp)
cf2:, cf2-A:, cf2-B:, uf1:, uf1-A:, uf1-B: (7210 SAS-R6 and 7210 SAS-R12)
cf1:, cf2: (7210 SAS-Sx/S 1/10GE: standalone and standalone-VC)

 

3.3.2.1.2. File Commands

attrib

Syntax 
attrib [+r | -r] file-url
attrib
Context 
file
Supported Platforms 

Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode

Description 

This command sets or 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 wild-card (*).

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 implies that the -r is set and that the file is read-write-all.

Parameters 
file-url—
Specifies the URL for the local file.

+r Sets the read-only attribute on the specified file.

-r Clears/resets the read-only attribute on the specified file.

Values—

file-url local-url | remote-url

local-url — [cflash-id/ | usb-flash-id] [file-path]

remote-url — [{ftp:// | tftp://} login:pswd@remote-locn/] [file- path]

remote-locn — [hostname | ipv4-address | ipv6-address]

                         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 to FFFF (hexadecimal)

                         d — 0 to 255 (decimal)

                         interface — a string up to 32, for link local addresses

cflash-id or usb-flash-id —

uf1: (7210 SAS-M)

cf1:, cf2:, uf1: (7210 SAS-T, 7210 SAS-Sx/S 1/10GE: standalone and standalone-VC, 7210 SAS-Sx 10/100GE, and 7210 SAS-Mxp)

cf2:, cf2-A:, cf2-B:, uf1:, uf1-A:, uf1-B: (7210 SAS-R6 and 7210 SAS-R12)

cf1:, cf2: (7210 SAS-Sx/S 1/10GE: standalone and standalone-VC)

 

+r—
Keyword to set the read-only attribute on the specified file.
-r—
Keyword to reset the read-only attribute on the specified file.

cd

Syntax 
cd [file-url]
Context 
file
Supported Platforms 

Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode

Description 

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

Parameters 
file-url—
Specifies the URL or filename.
Values—

file-url local-url | remote-url

local-url — [cflash-id/ | usb-flash-id] [file-path]

remote-url — [{ftp:// | tftp://} login:pswd@remote-locn/] [file- path]

remote-locn — [hostname | ipv4-address | ipv6-address]

                         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 to FFFF (hexadecimal)

                         d — 0 to 255 (decimal)

                         interface — a string up to 32, for link local addresses

cflash-id or usb-flash-id —

uf1: (7210 SAS-M)

cf1:, cf2:, uf1: (7210 SAS-T, 7210 SAS-Sx/S 1/10GE: standalone and standalone-VC, 7210 SAS-Sx 10/100GE, and 7210 SAS-Mxp)

cf2:, cf2-A:, cf2-B:, uf1:, uf1-A:, uf1-B: (7210 SAS-R6 and 7210 SAS-R12)

cf1:, cf2: (7210 SAS-Sx/S 1/10GE: standalone and standalone-VC)

 

none—
Displays the current working directory.
..—
Specifies the parent directory. This can be used in place of an actual directory name in a directory-url.
directory-url—
Specifies the destination directory.

copy

Syntax 
copy source-file-url dest-file-url [force]
Context 
file
Supported Platforms 

Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode

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 wild-card (*) 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 cf1 to a file called destfile in a directory called production on cf1, the syntax is:

sr1>file cf1:\ # copy cf2-/test/srcfile/production/destfile

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

copy /mydir/121201.cfg 192.0.2.79/backup/121201.cfg

Parameters 
source-file-url—
Specifies the location of the source file or directory to be copied.
dest-file-url—
Specifies the destination of the copied file or directory.
Values—

file-url local-url | remote-url

local-url — [cflash-id/ | usb-flash-id] [file-path]

remote-url — [{ftp:// | tftp://} login:pswd@remote-locn/] [file- path]

remote-locn — [hostname | ipv4-address | ipv6-address]

                         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 to FFFF (hexadecimal)

                         d — 0 to 255 (decimal)

                         interface — a string up to 32, for link local addresses

cflash-id or usb-flash-id —

uf1: (7210 SAS-M)

cf1:, cf2:, uf1: (7210 SAS-T, 7210 SAS-Sx/S 1/10GE: standalone and standalone-VC, 7210 SAS-Sx 10/100GE, and 7210 SAS-Mxp)

cf2:, cf2-A:, cf2-B:, uf1:, uf1-A:, uf1-B: (7210 SAS-R6 and 7210 SAS-R12)

cf1:, cf2: (7210 SAS-Sx/S 1/10GE: standalone and standalone-VC)

 

force—
Keyword to force an immediate copy of the specified file(s).
file copy force—
Keyword to execute the command without displaying a user prompt message.

delete

Syntax 
delete file-url [force]
Context 
file
Supported Platforms 

Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode

Description 

This command deletes the specified file.

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

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

Parameters 
file-url—
Specifies the URL or filename.
Values—

file-url local-url | remote-url

local-url — [cflash-id/ | usb-flash-id] [file-path]

remote-url — [ftp:// login:pswd@remote-locn/] [file- path]

remote-locn — [hostname | ipv4-address | ipv6-address]

                         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 to FFFF (hexadecimal)

                         d — 0 to 255 (decimal)

                         interface — a string up to 32, for link local addresses

cflash-id or usb-flash-id —

uf1: (7210 SAS-M)

cf1:, cf2:, uf1: (7210 SAS-T, 7210 SAS-Sx/S 1/10GE: standalone and standalone-VC, 7210 SAS-Sx 10/100GE, and 7210 SAS-Mxp)

cf2:, cf2-A:, cf2-B:, uf1:, uf1-A:, uf1-B: (7210 SAS-R6 and 7210 SAS-R12)

cf1:, cf2: (7210 SAS-Sx/S 1/10GE: standalone and standalone-VC)

 

force—
Keyword to force an immediate deletion of the specified file.

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

dir

Syntax 
dir [file-url] [sort-order {d | n | s}] [reverse]
Context 
file
Supported Platforms 

Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode

Description 

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

Parameters 
file-url—
Specifies the URL or filename. Use the file-url with the optional wildcard (*) to reduce the number of files to list.
Values—

file-url local-url | remote-url

local-url — [cflash-id/ | usb-flash-id] [file-path]

remote-url — [ftp:// login:pswd@remote-locn/] [file- path]

remote-locn — [hostname | ipv4-address | ipv6-address]

                         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 to FFFF (hexadecimal)

                         d — 0 to 255 (decimal)

                         interface — a string up to 32, for link local addresses

cflash-id or usb-flash-id —

uf1: (7210 SAS-M)

cf1:, cf2:, uf1: (7210 SAS-T, 7210 SAS-Sx/S 1/10GE: standalone and standalone-VC, 7210 SAS-Sx 10/100GE, and 7210 SAS-Mxp)

cf2:, cf2-A:, cf2-B:, uf1:, uf1-A:, uf1-B: (7210 SAS-R6 and 7210 SAS-R12)

cf1:, cf2: (7210 SAS-Sx/S 1/10GE: standalone and standalone-VC)

 

sort-order {d | n | s}
Specifies the sort order.
Values—
d — date
n — name
s — size

 

reverse —
Specifies to reverse the sort order.
Default—
lists all files in the present working directory

file

Syntax 
file
Context 
<root>
Supported Platforms 

Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode

Description 

This command enables access to the context to enter and 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.

format

Syntax 
format cflash cflash-id
Context 
root>file
Supported Platforms 

Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode

Description 

This command formats the compact flash. The compact flash must be shutdown before starting the format.

Parameters 
cflash-id—
Specifies the compact flash type.
Values—
cflash-id — uf1: (7210 SAS-M)
                   cf1:, cf2:, uf1: (7210 SAS-T, 7210 SAS-Sx/S 1/10GE: standalone and standalone-VC, 7210 SAS-Sx 10/100GE, and 7210 SAS-Mxp)
                   cf2:, cf2-A:, cf2-B:, uf1:, uf1-A:, uf1-B: (7210 SAS-R6 and 7210 SAS-R12)
                   cf1:, cf2: (7210 SAS-Sx/S 1/10GE: standalone and standalone-VC)

 

md

Syntax 
md file-url
Context 
file
Supported Platforms 

Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode

Description 

This command creates a new directory in a file system.

Directories can only be created one level at a time.

Parameters 
file-url—
Specifies the URL or filename.
Values—

file-url local-url | remote-url

local-url — [cflash-id/ | usb-flash-id] [file-path]

remote-url — [ftp:// login:pswd@remote-locn/] [file- path]

remote-locn — [hostname | ipv4-address | ipv6-address]

                         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 to FFFF (hexadecimal)

                         d — 0 to 255 (decimal)

                         interface — a string up to 32, for link local addresses

cflash-id or usb-flash-id —

uf1: (7210 SAS-M)

cf1:, cf2:, uf1: (7210 SAS-T, 7210 SAS-Sx/S 1/10GE: standalone and standalone-VC, 7210 SAS-Sx 10/100GE, and 7210 SAS-Mxp)

cf2:, cf2-A:, cf2-B:, uf1:, uf1-A:, uf1-B: (7210 SAS-R6 and 7210 SAS-R12)

cf1:, cf2: (7210 SAS-Sx/S 1/10GE: standalone and standalone-VC)

 

move

Syntax 
move old-file-url new-file-url [force]
Context 
file
Supported Platforms 

Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode

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.

Parameters 
old-file-url new-file url—
Specifies the file or directory to be moved and the new destination to place the old file URL.
Values—

file-url local-url | remote-url

local-url — [cflash-id/ | usb-flash-id] [file-path]

remote-url — [ftp:// login:pswd@remote-locn/] [file- path]

remote-locn — [hostname | ipv4-address | ipv6-address]

                         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 to FFFF (hexadecimal)

                         d — 0 to 255 (decimal)

                         interface — a string up to 32, for link local addresses

cflash-id or usb-flash-id —

uf1: (7210 SAS-M)

cf1:, cf2:, uf1: (7210 SAS-T, 7210 SAS-Sx/S 1/10GE: standalone and standalone-VC, 7210 SAS-Sx 10/100GE, and 7210 SAS-Mxp)

cf2:, cf2-A:, cf2-B:, uf1:, uf1-A:, uf1-B: (7210 SAS-R6 and 7210 SAS-R12)

cf1:, cf2: (7210 SAS-Sx/S 1/10GE: standalone and standalone-VC)

 

force—
Keyword to force an immediate move of the specified file. The file move force command is executed without displaying a user prompt message.

rd

Syntax 
rd file-url rf [force]
Context 
file
Supported Platforms 

Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode

Description 

The rd command is used to delete a directory.

If a directory has files and no sub-directories, the force option must be used to force delete the directory and files it contains.

Parameters 
file-url—
Specifies the directory to be removed.
Values—

file-url local-url | remote-url

local-url — [cflash-id/ | usb-flash-id] [file-path]

remote-url — [ftp:// login:pswd@remote-locn/] [file- path]

remote-locn — [hostname | ipv4-address | ipv6-address]

                         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 to FFFF (hexadecimal)

                         d — 0 to 255 (decimal)

                         interface — a string up to 32, for link local addresses

cflash-id or usb-flash-id —

uf1: (7210 SAS-M)

cf1:, cf2:, uf1: (7210 SAS-T, 7210 SAS-Sx/S 1/10GE: standalone and standalone-VC, 7210 SAS-Sx 10/100GE, and 7210 SAS-Mxp)

cf2:, cf2-A:, cf2-B:, uf1:, uf1-A:, uf1-B: (7210 SAS-R6 and 7210 SAS-R12)

cf1:, cf2: (7210 SAS-Sx/S 1/10GE: standalone and standalone-VC)

 

rf—
Keyword to force a recursive delete.
force—
Keyword to force an immediate deletion of the specified directory.

The rd file-url force command is executed without displaying a user prompt message.

repair

Syntax 
repair [cflash-id]
Context 
file
Supported Platforms 

Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode

Description 

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

Parameters 
cflash-id—
Specifies the compact flash slot ID to be shutdown or enabled. If no cflash-id is specified, the drive referred to by the current working directory is assumed.
Values—
uf1: (7210 SAS-M)
cf1:, cf2:, uf1: (7210 SAS-T, 7210 SAS-Sx/S 1/10GE: standalone and standalone-VC, 7210 SAS-Sx 10/100GE, and 7210 SAS-Mxp)
cf2:, cf2-A:, cf2-B:, uf1:, uf1-A:, uf1-B: (7210 SAS-R6 and 7210 SAS-R12)
cf1:, cf2: (7210 SAS-Sx/S 1/10GE: standalone and standalone-VC)

 

scp

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

Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode

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. The following prompt appears:

“Are you sure (y/n)?” The destination must specify a user and a host.

Parameters 
local-file-url—
Specifies the local source file or directory.
Values—

local-file-url — [cflash-id/] [file-path]

cflash-id or usb-flash-id

uf1: (7210 SAS-M)

cf1:, cf2:, uf1: (7210 SAS-T, 7210 SAS-Sx/S 1/10GE: standalone and standalone-VC, 7210 SAS-Sx 10/100GE, and 7210 SAS-Mxp)

cf2:, cf2-A:, cf2-B:, uf1:, uf1-A:, uf1-B: (7210 SAS-R6 and 7210 SAS-R12)

cf1:, cf2: (7210 SAS-Sx/S 1/10GE: standalone and standalone-VC)

 

destination-file-url—
Specifies the destination file.
user—
Specifies the SSH user.
host—
Specifies the remote host IP address of DNS name.
file-path—
Specifies the destination path.
router-instance
Specifies the router name or service ID.
Values—
router-instanceuser@hostname:file-path] | router-name
user — up to 32 characters
hostname — [dns-name | ipv4-address | ipv6-address]
                     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 to FFFF (hexadecimal)
                                               d — 0 to 255 (decimal)
                                               interface — up to 32 characters max,                                                for link local addresses
dns-name — up to 128 characters
file-path — up to 200 characters
                 directory length, up to 99 characters each
router-name: Base, Management
                           Default - Base

 

force—
Keyword to force an immediate copy of the specified file.The file scp local-file-url destination-file-url [router] force command executes without displaying a user prompt message.

type

Syntax 
type file-url
Context 
file
Supported Platforms 

Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode

Description 

This command displays the contents of a text file.

Parameters 
file-url—
Specifies the file name of the target file.
Values—

file-url local-url | remote-url

local-url — [cflash-id/ | usb-flash-id] [file-path]

remote-url —[ftp:// login:pswd@remote-locn/] [file- path]

remote-locn — [hostname | ipv4-address | ipv6-address]

                         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 to FFFF (hexadecimal)

                         d — 0 to 255 (decimal)

                         interface — a string up to 32, for link local addresses

cflash-id or usb-flash-id —

uf1: (7210 SAS-M)

cf1:, cf2:, uf1: (7210 SAS-T, 7210 SAS-Sx/S 1/10GE: standalone and standalone-VC, 7210 SAS-Sx 10/100GE, and 7210 SAS-Mxp)

cf2:, cf2-A:, cf2-B:, uf1:, uf1-A:, uf1-B: (7210 SAS-R6 and 7210 SAS-R12)

cf1:, cf2: (7210 SAS-Sx/S 1/10GE: standalone and standalone-VC)

 

version

Syntax 
version file-url [check]
Context 
file
Supported Platforms 

Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode

Description 

This command displays the version of a -TiMOS file.

Parameters 
file-url—
Specifies the file name of the target file.
Values—

file-url local-url | remote-url

local-url — [cflash-id/ | usb-flash-id] [file-path]

remote-url —[ftp:// login:pswd@remote-locn/] [file- path]

remote-locn — [hostname | ipv4-address | ipv6-address]

                         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 to FFFF (hexadecimal)

                         d — 0 to 255 (decimal)

                         interface — a string up to 32, for link local addresses

cflash-id or usb-flash-id —

uf1: (7210 SAS-M)

cf1:, cf2:, uf1: (7210 SAS-T, 7210 SAS-Sx/S 1/10GE: standalone and standalone-VC, 7210 SAS-Sx 10/100GE, and 7210 SAS-Mxp)

cf2:, cf2-A:, cf2-B:, uf1:, uf1-A:, uf1-B: (7210 SAS-R6 and 7210 SAS-R12)

cf1:, cf2: (7210 SAS-Sx/S 1/10GE: standalone and standalone-VC)

 

check—
Keyword to validates the .tim file.