The get command is used to transfer a file from the remote host to the local host. Files may also be transferred from the remote host to the local host with the commands mget and recv. A special variant of the get command, the reget command (see "reget - Fetch a file with restart support"), is now available for supporting restart functionality.
get |
<remote-file> [<local-file>] |
<remote-file>
Name of a file on the remote host to be transferred to the local host.
<local-file>
Name of a POSIX or DMS file on the local host. If the file already exists, it is overwritten or, alternatively, a new file is created after adding an appropriate suffix. This behavior is controlled by runique. If the file does not exist, a new file is created.
If the local-file operand is omitted, the name of the remote file is used (in this case, the name of the remote file must correspond to the file naming conventions on the local host).
Example
The remote host is a Unix host.
The names of the local and remote working directories are queried.
lpwd Local directory is :5:$TCPTEST.MAN.VON.UNIX. pwd 257 /home/usr/man is current directory.
The contents of the file anton (in the remote working directory) are transferred to a DMS file of the same name (in the local working directory). The FTP server function PORT is called implicitly.
get anton 200 PORT command okay. ...
The directory is changed to the POSIX HOME directory.
lcd %POSIX Local directory now /home/usr
The remote file anton is transferred to the local host and stored in the POSIX file system under the name /home/usr/berta.
get anton berta 200 PORT command okay. ...