The perl script transfer was written to facilitate easy transfer of entire directory trees via FTP and to allow the user to exclude certain files or directories from the transfer. The script logs each transfer in a user-specified log file and indicates whether each transfer was successful or failed.
The script supports two type of transfers, a "full" transfer and an "incremental" transfer. In a full transfer, all of the files that are not on the list of files to be excluded are transferred. In an incremental transfer only files more recently modified than the log file that are not on the list of files to be excluded are transferred. By default, transfer executes a full transfer.
When using transfer, the user must specify information such as the name of the remote host and the username and password for the account on the remote host. Other information such as the list of files to be excluded from transfer is optional. See Information for a complete list of required and optional information.
Information may be specified in three ways. First, all information can be specified on the command line using command line options. Information specified on the command line takes precedence over information specified through any other means. See Usage for details.
Alternatively, the user may store information in a file called an "information" file. The name of the information file can be specified on the command line using the "-f" option. If an information file is not provided on the command line and the HOME environment variable is set, transfer will check the file $HOME/.transferrc for information. This allows a user to keep a default information file so that the user only needs to provide information that changes with each transfer. See Information Files for a description of the syntax of information files.
Lastly, users may allow transfer to prompt them for information. In particular, the user is prompted for any required information that is not provided on the command line or in an information file.
This behavior is useful when it comes to specifying the remote username and password. The most secure way to specify the remote username and password is to allow transfer to prompt you for the information. Other information that doesn't change between transfers could be specified in $HOME/.transferrc to minimize the amount of typing that the user has to perform.
The script can be used interactively or automatically via a facility such as "at" or "cron". In this case, an information file must be given on the command line since the HOME environment variable is usually not set. The file must provide all needed information since the script will not be able to query the user.
The necessary information includes the username and password for the remote account. Therefore, any information file containing a username or a password should only be readable by the user. This means that you should execute the following command for whatever information file you intend to use:
where "info_file" is a path to your information file. See Security Concerns for a discussion of security issues and suggestions.
See the Examples section below for scenarios in which one might use transfer.