File Transfer Options
The set command allows you to set options which control the way in which file transfer operates. The following options are available:
BINARY This allows you to copy files from UNIX to Reality or from UNIX to UNIX without replacing newline characters with attribute marks. Use this option when copying binary data that must not be changed.
Note
You will only need to select this option when copying binary data from UNIX to Reality.
-
When copying binary items from Reality to UNIX, attribute mark/newline translation is disabled automatically.
-
When you copy data from a remote UNIX system, the data is assumed to be ASCII. To copy binary data, use REMLOG to logon to the remote system and then use SFT to copy the data to your local system.
OVERWRITE This controls whether or not existing Reality items or UNIX files will be overwritten:
-
If OVERWRITE is set to
OFF
(the default setting), when you use the get and put commands, existing Reality items and UNIX files will not be overwritten. If the item or file you are copying already exists in the destination file or directory, you will see the following message:file|item [not transferred - item already exists (overwrite off)]
where file|item is the name of the UNIX file or Reality item.
-
If OVERWRITE is set to
ON
, existing Reality items and UNIX files will be overwritten.
Caution
With OVERWRITE set to ON, you will receive no warning that existing files are being overwritten.
Both of these options can be set to ON or OFF. By default, both are set to OFF.
The .sftrc File
If you wish, you can create a file containing your preferred BINARY and OVERWRITE settings. This file must be called .sftrc and can be placed in the current directory or in your home directory. SFT searches for the file first in your current directory and then in your home directory.
The .sftrc file must contain one line for each option you wish to set. Each line must contain the following:
set Option Setting
For example:
set overwrite on
set binary on
If, when you start SFT, it finds a .sftrc file, you will see messages similar to the following (depending on the settings in the file):
$sft
[local directory .sftrc settings]
sft> set binary on
sft> set overwrite on
sft>