URLs

The arguments for the 7210 SAS file commands are modeled after standard universal resource locators (URLs). A URL refers to a file (file-url) or a directory (directory-url).

The 7210 SAS supports operations on both the local file system and remote files. For the purposes of categorizing the applicability of commands to local and remote file operations, URLs are divided into three types: local, ftp and tftp. The following table describes the syntax for each of the URL types.

Table: URL types and syntax

URL type

Syntax

Notes

local-url

[cflash-id:\]path

[usb-flash-id:\] path

cflash-id is the compact flash device name

Values: cf1:

usb-flash-id is the USB device name

Values: uf1:

ftp-url

ftp://[username[:password]@]host/path

An absolute ftp path from the root of the remote file system

username is the ftp username

password is the ftp user password

host is the remote host

path is the path to the directory or file

ftp://[username[:password]@]host/./path

A relative ftp path from the user’s home directory Note the period and slash (‟./”) in this syntax compared to the absolute path

tftp-url

tftp://host[/path]/filename

tftp is only supported for operations on file URLs

The system accepts either forward slash (‟/”) or backslash (‟\”) characters to delimit directory and filenames in URLs. Similarly, the 7210 SAS SCP client application can use either slash or backslash characters, but not all SCP clients treat backslash characters as equivalent to slash characters. In particular, UNIX systems often interpret the backslash character as an ‟escape” character. This can cause problems when using an external SCP client application to send files to the SCP server. If the external system treats the backslash like an escape character, the backslash delimiter is stripped by the parser and not transmitted to the SCP server.

For example, a destination directory specified as ‟cf1:\dir1\file1” is transmitted to the SCP server as ‟cf1:dir1file1”, where the backslash escape characters are stripped by the SCP client system before transmission. On systems where the client treats the backslash like an ‟escape” character, a double backslash ‟\\” or the forward slash ‟/” can typically be used to correctly delimit directories and the filename.

All the commands can operate on the local file system. The following table describes which commands also support remote file operations.

Table: File command local and remote file system support

Command

local-url

ftp-url

tftp-url

attrib

cd

copy

delete

dir

md

move

rd

scp

Source only

type

version