Transferring Files

Before you can transfer data using SFT, you must connect to the remote environment. The way in which the data is transferred then depends on the type of remote environment and the direction of transfer.

Reality to UNIX

The get command allows you to copy data from Reality files to UNIX files. You must supply the name of a Reality file and an item-id, and also the path of the UNIX directory into which the data will be copied. You can copy either a single, specified item, or all the items in the file.

For each item copied, a UNIX file with the same name will be created. By default, attribute marks in each Reality item are converted into newline characters, so that, in the UNIX file, each Reality attribute starts on a new line.

UNIX to Reality

The put command allows you to copy data from UNIX files to Reality files. You must specify the UNIX directory containing the file and the name of the file (you can also copy all the files in the directory), and also the name of the Reality file into which the data will be copied.

For each file copied, an item with the same name will be created in the Reality file. By default, newline characters in each UNIX file are converted into Reality attribute marks.

UNIX To UNIX

When copying between UNIX systems, you use the following commands:

In both cases you must specify the directory containing the source file, the file to be copied, and the directory into which to copy it. You can copy either a single, specified file, or all the files in the directory.

UNIX File and Directory Names

When you use the put and get commands to copy UNIX files, you must specify the directory separately from the file name. For example, to copy the file /home/pauls/report1 to a remote environment, you must enter

put /home/pauls report1

with a space (rather than a slash) between /home/pauls  and report1.

You will find this easier to remember if you think of a UNIX directory as being equivalent to a Reality file, and a UNIX file as a Reality file item. This is similar to Reality directory view, which allows you to access UNIX directories as if they were Reality files.