bbftp (Index) | Updated: 2000/08/28 | Section: User Commands (1) |
bbftp -v
bbftp -u RemoteUsername -i ControlFile [ -b ] [ -c ] [ -o OutputFile ] [ -p NumberOfParallelStreams ] [ -r NumberOfTries ] [ -t ] RemoteHost
Use the bbftp command to transfer files between the local host and a remote host.
In order to get better performance on a loaded Wide Area Network than transferring with the standard ftp command, use the bbftp command. bbftp has been designed to take advantage of the RFC 1323 and uses multiple streams is order to speed up transfer. It also implements an automatic retry in case of failure of commands contained in the ControlFile
The bbftpd daemon has to be installed on the remote host in order to be able to transfer files.
The behaviour of bbftp is controled by the ControlFile (see CONTROL FILE FORMAT ) which contains the commands to be executed. Those commands cannot be given interactively. bbftp also generates a ResultFile which is located in the same directory as the ControlFile (see RESULT FILE FORMAT ).
bbftp may be used in one of the following ways:
bbftp
bbftp -v
bbftp [ Options ] -i ControlFile -u RemoteUsername RemoteHost
See OPTIONS section, for a full description of the Options.
The control file is an ASCII file containing the commands to be executed. Each line of the file represent one command. The following commands are available:
If the RemoteDirectory is given in relative mode (not beginning by a /), it is searched relative to the directory where the daemon is currently. After the first connection the current directory is the home directory of the RemoteUsername.
The client keep in mind the current remote directory so in case of broken connection during a transfer, it reset the current directory of the daemon to the correct directory
If the RemoteFile is given in relative mode (not beginning by a /), it is searched relative to the current directory on the remote host (which is set to the home directory of the RemoteUsername at the beginning).
If the LocalFile is given in relative mode (not beginning by a /) the file is created relative to the directory where the bbftp command is running (which may have been changed with the lcd command).
If the RemoteFile is given in relative mode (not beginning by a /), it is searched relative to the current directory on the remote host (which is set to the home directory of the RemoteUsername at the beginning) and created on the local host relative to the directory where the bbftp command is running (which may have been changed with the lcd command).
If the LocalDirectory is given in relative mode (not beginning by a /), it is searched relative to the directory where the client is currently.
If one directory in the path given does not exist the command fail and no retry is done.
If the LocalFile is given in relative mode (not beginning by a /) the file is searched relative to the directory where the bbftp command is running (which may have been changed with the lcd command).
If the RemoteFile is given in relative mode (not beginning by a /), it is created relative to the current directory on the remote host (which is set to the home directory of the RemoteUsername at the beginning).
If the LocalFile is given in relative mode (not beginning by a /) the file is searched relative to the directory where the bbftp command is running (which may have been changed with the lcd command) and created relative to the current directory on the remote host (which is set to the home directory of the RemoteUsername at the beginning).
On Linux all transfer commands are limited to files of 2 Gigabytes.
The
ResultFile
is created in the same directory as the
ControlFile.
Its name is ControlFile with the extension ".res". It contains the
same lines as the
ControlFile
plus the keyword OK, in case of success, or FAILED, in case of failure.
The following control file named ctrlfile:
mkdir /scratch/jon
put /home/user/f1 /scratch/jon/f1
put f2 f3
get f4 /tmp/f5
may be used in the following command:
bbftp -i ctrlfile -u jon -p 5 -c host2
This mean that the bbftp command will used the ControlFile ctrlfile to execute several commands. All transfer commands will be done in compressed mode with five streams. The username on host2 will be jon.
Commands 1 and 2 are done in absolute mode. Commands 3 is done relative to the directory where the bbftp command is run for f2 and relative to the home directory of user jon on host2 for f3. Command 4 is done relative to the directory of user jon on host2 for f4 and in absolute mode for file f5.
The ResultFile whose name will be ctrlfile.res may contain :
mkdir /scratch/jon OK
put /home/user/f1 /scratch/jon/f1 FAILED
put f2 f3 OK
get f4 /tmp/f5 OK
This means that commands 1 3 and 4 were successfull and command 2 failed.
No return value, see the ResultFile or the standard output
Informative and error messages are written to the standard output file.
bbftp was developed by Gilles Farrache (farrache@cc.in2p3.fr) at the Centre de Calcul de l'IN2P3 - Villeurbanne (FRANCE).
This software uses the cryptolib 0.9.5 of the OpenSSL project
and zlib 1.1.3 written by Jean-Loup Gally and Mark Adler.