put Command
The put command allows you to copy files from the local UNIX environment to a remote environment.
Syntax
put { Directory { [ UnixFile || * ] } }
Syntax Elements
Directory is the local UNIX directory containing the file or files to be copied.
UnixFile is the name of a single UNIX file to be copied.
Note
You must leave a space between the UNIX directory and file name.
* Specifies that all files are to be copied.
The put command prompts for its parameters as follows:
-
Used with no parameters, put prompts for the source Directory and UnixFile and for the destination Reality file or UNIX directory. For example:
sft>
put
FROM:fred ITEM17
TO:TESTFILE
*
[ 1 item(s) transferred]
sft> -
Used with only a Directory parameter, put displays the following message:
[ITEMID required - Ctrl-D to cancel]
It then prompts for the source UnixFile, and for the destination Reality file or UNIX directory. For example:
sft>
put fred
[ITEMID required - Ctrl-D to cancel]
FROM: fredITEM17
TO:TESTFILE
*
[ 1 item(s) transferred]
sft> -
Used with both a Directory parameter and a UnixFile, put prompts only for the destination Reality file or UNIX directory. For example:
sft>
put fred ITEM17
TO:TESTFILE
*
[ 1 item(s) transferred]
sft>
The items created in the destination Reality file, or the UNIX files created in the destination directory (as appropriate), will have the same names as the source files.
Note: You cannot use UNIX wild-card characters in the Directory or UnixFile parameters.
Remarks
You can only use the put command if a connection to a remote environment has already been established by using the connect command.
The destination Reality file or UNIX directory must already exist before you use the put command.
You cannot transfer UNIX special files, named pipes or sub-directories with the put command.
An asterisk is displayed on the screen for each item or file transferred.
Examples
sft>put fred ITEM01
TO:TEST
*
[ 1 item(s) transferred]
sft>
In the above example, the UNIX file ITEM01 is copied to the Reality file TEST. The data is written to an item called ITEM01 within the TEST file.
sft>put
FROM:tom/dick/harry *
TO:/usr/harry
********
[ 8 out of 8 item(s) transferred]
sft>
In this example all the files in the UNIX directory tom/dick/harry are copied to the /usr/harry directory on a remote UNIX system.