DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

rftp(TC)


rftp -- rapid file transfer program

Syntax

rftp [ -g|l|m|p|t ] [ -bdhuv ] [ -S "var val [ var val ] ..." ]
{ remhost dir | -k key } [ -f file ] [ -s subdir ] files

Description

rftp is a rapid file transfer program based on the ftp program which implements the Internet standard File Transfer Protocol (FTP). rftp allows a user to transfer files to and from a remote network site in a non-interactive fashion, thus reducing the time spent in entering and exiting an ftp session.

The command executed by the FTP client is completely driven by the options specified on the command line. The options, in conjunction with the data files, whose purposes are explained below, enable a user to perform complete transactions of file transfers between machines. All options have to be specified on the command line.

Transfer options


-g
use to get a file specified by files residing under the directory specified by dir from remhost

-l
use to list the contents of the directory specified by dir on remhost

-m
use to do multiple gets of files specified by files from remhost. The multiple file arguments must be enclosed in quotes. See the ``Examples'' section. Retrieved files are placed in the current directory on the local machine.

-p
use to put a file specified by files residing under the directory specified by dir from the local machine to remhost

-t
use to do multiple puts of files specified by files to remhost. The multiple file arguments must be enclosed in quotes. See the ``Examples'' section. Files are transferred to the directory specified by dir.

Administrative options


-b
enables binary mode file transfer. If this option is not specified, the file transfers are done in ASCII mode

-d
prints debugging information

-h
enables hash mark printing during file transfers

-u
forces the program to read information from the .netrc file. See ``The .netrc file''. If this option is specified and the .netrc file doesn't exist, then the program exits.

-v
prints the rftp session to the terminal

-S ``var val''
is used to pass site specific information to remhost. Multiple variables may be set by enclosing all variables and values in quotes and separating items with white space. For sites that require a group name and group password, set var to group and set val to the group name. rftp will use the remhost value and the group name to search the $HOME/.sitefile for the password. See ``The .sitefile file'' and ``Examples'' for more information.

Location options


remhost
name of the remote host. This argument must be specified if the -k option is not.

dir
name of the directory from which or to which file transfer is occurring depending on transfer option used. This argument must be specified if the -k option is not.

-k key
rftp uses the value of the argument key to index through the file .ftpkeys to find values to use for remhost and dir. See ``The .ftpkeys file''.

-f file
rftp uses the file specified by the argument file in place of the .ftpkeys file. See ``The .ftpkeys file'' for the format to use for file.

-s subdir
appends the value of the argument subdir to the target directory dir. This append occurs whether dir is specified on the command line or in the .ftpkeys file.

The .sitefile file

The .sitefile is used to pass site specific information such as group-name and group-password to the remote site if the remote site requires it. The $HOME/.sitefile should be owned by the user for the site command to pass. The following is the format of the .sitefile:

machine group gpass
If the -S option is specified the rftp program uses the remhost to index through the .sitefile. If it finds a matching host in the the file, it uses the next two arguments as the groupname and password, respectively, for the corresponding site command.

The .ftpkeys file

The user may either specify the remote machine and the directory on the command line or specify a keyword (with the -k option) that is used to index through .ftpkeys whose format is:

keyword machine directory
The three fields can be separated by spaces or tabs. The .ftpkeys file can be specified by setting the environment variable FTPKEYS. If this variable is not set, the current working directory is searched for a file named .ftpkeys. If this fails, $HOME is searched.

The .netrc file

The .netrc file is used in the same way the ftp program uses it. If this file is not present, rftp uses the login name ``anonymous'' to login into the remote host and sends the user's logname@hostname as the password.

Examples

To list remote files under /pub on remote host laidown through anonymous ftp:

rftp -l laidown /pub

To list remote files under /pub (using the .netrc file) and set the idle time for the connection to 5000 seconds:

rftp -l -u -S "idle 5000" laidown /pub

To set the group name and group password using the site command and list files under /pub on remote host laidown through anonymous ftp:

rftp -g -l -S ``group lachman'' laidown /pub

where $HOME/.sitefile would have the entry:

laidown lachman dudesRus

To mget files docfile1 and docfile2 under the directory /pub from a remote host laidown using the .netrc file, there are a couple of ways to do this. Firstly, the remote hostname and directory can be specified on the command line:

rftp -m -u laidown /pub "docfile1 docfile2"

To do the above using the .ftpkeys file:

rftp -m -u -k doc_dir "docfile1 docfile2"

where .ftpkeys would have the entry:

doc_dir laidown /etc

Limitations

This program suffers the same limitations from which the ftp program suffers.

Files

.netrc
.ftpkeys
$HOME/.sitefile

See also

ftp(TC), ftpd(ADMN)

Standards conformance

This software is based on code submitted to the USENET newsgroup comp.sources.unix by Michael Zraly, which is in turn based on code by John Granrose.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005