attrib [+r | -r] file-url
attrib
file
Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode
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.
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.
Keyword to set the read-only attribute on the specified file.
Keyword to reset the read-only attribute on the specified file.
cd [file-url]
file
Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode
This command displays or changes the current working directory in the local file system.
Specifies the URL or filename.
Displays the current working directory.
Specifies the parent directory. This can be used in place of an actual directory name in a directory-url.
Specifies the destination directory.
copy source-file-url dest-file-url [force]
file
Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode
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
Specifies the location of the source file or directory to be copied.
Specifies the destination of the copied file or directory.
Keyword to force an immediate copy of the specified file(s).
Keyword to execute the command without displaying a user prompt message.
delete file-url [force]
file
Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode
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)?”
Specifies the URL or filename.
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 [file-url] [sort-order {d | n | s}] [reverse]
file
Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode
This command displays a list of files and subdirectories in a directory.
Specifies the URL or filename. Use the file-url with the optional wildcard (*) to reduce the number of files to list.
Specifies the sort order.
Specifies to reverse the sort order.
file
<root>
Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode
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 cflash cflash-id
root>file
Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode
This command formats the compact flash. The compact flash must be shutdown before starting the format.
Specifies the compact flash type.
md file-url
file
Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode
This command creates a new directory in a file system.
Directories can only be created one level at a time.
Specifies the URL or filename.
move old-file-url new-file-url [force]
file
Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode
This command moves a local file, system file, or a directory. If the target already exists, the command fails and an error message displays.
Specifies the file or directory to be moved and the new destination to place the old file URL.
Keyword to force an immediate move of the specified file. The file move force command is executed without displaying a user prompt message.
rd file-url rf [force]
file
Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode
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.
Specifies the directory to be removed.
Keyword to force a recursive delete.
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 [cflash-id]
file
Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode
This command checks a compact flash device for errors and repairs any errors found.
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.
scp local-file-url destination-file-url [router router-instance] [force]
file
Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode
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.
Specifies the local source file or directory.
Specifies the destination file.
Specifies the SSH user.
Specifies the remote host IP address of DNS name.
Specifies the destination path.
Specifies the router name or service ID.
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 file-url
file
Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode
This command displays the contents of a text file.
Specifies the file name of the target file.
version file-url [check]
file
Supported on all 7210 SAS platforms as described in this document, including those operating in access-uplink mode
This command displays the version of a -TiMOS file.
Specifies the file name of the target file.
Keyword to validates the .tim file.