bbftpc (Index) Updated: 2000/08/28 Section: User Commands (1)

 

NAME

bbftpc - transfer files using compression and parallel streams (to use in conjunction with the bbftpcd daemon)

 

SYNOPSIS

bbftpc -v

bbftpc { -i ControlFile | -e Command } -m MagicNumber [ -b ] [ -c ] [ -o OutputFile ] [ -p NumberOfParallelStreams ] [ -r NumberOfTries ] [ -t ]

 

DESCRIPTION

Use the bbftpc in conjunction with the bbftpcd command to transfer files between the local host and a remote host.

bbftpc does not realy do the transfer but communicate with the bbftpcd daemon which is the body that do the transfer.

bbftpc has been developped in order to have a command line that will do the transfer between the local host and a remote host without giving the username and the password on the remote host. Those data have been given to the bbftpcd once, and then, will never be asked anymore.

The bbftpd daemon has to be installed on the remote host in order to be able to transfer files and a bbftpcd daemon has to be started before any use of the bbftpc command

The behaviour of bbftpc is controled by the ControlFile (see CONTROL FILE FORMAT ) which contains the commands to be executed or by a single command in the same format. If a ControlFile is used, bbftpc also generates a ResultFile which is located in the same directory as the ControlFile (see RESULT FILE FORMAT ).

bbftpc may be used in one of the following ways:

bbftpc

to print a short help

bbftpc -v

to write to standard output the version of the software.

bbftpc [ Options ] { -i ControlFile | -e Command } -m Magic Number

to request the execution of the control file ControlFile or of the command Command using the bbftpcd daemon of pid MagicNumber
WARNING
The bbftpcd daemon has to be run with the same uid than the bbftpc command.

See OPTIONS section, for a full description of the Options.

 

OPTIONS

-b
Use this option to run bbftpc in background.
-c
Use this option to compress the data during transmission. Compression and uncompression are done "on the fly" and do not require any additionnal disk space. Do not use it if the files to transmit are not compressible, as this will only lead to a waste of CPU and time.
-o OutputFile
Use this option to redirect the data generated on the standard output to OutputFile
-p NumberOfParralelStreams
Use this option to increase the number of streams to use during the file transfer. The maximum is 10. Default is 1.
-r NumberOfTries
Use this option to change the number of tries to use when a transfer fail. The default is 5.
-t
Use this option to have a timestamp on the output.

 

CONTROL FILE FORMAT

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:

cd RemoteDirectory
Change the current directory of the daemon on the remote host.

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

get RemoteFile LocalFile
Transfer the remote file RemoteFile to the local host with the name LocalFile. If the local file already exists it is overwritten. Under some circumstances (No space left on device, Access denied, File is a directory ...), no retry is done and the next command of the file is processed.

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 bbftpc command is running (which may have been changed with the lcd command).

get RemoteFile
Transfer the remote file RemoteFile to the local host with the name RemoteFile.

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 bbftpc command is running (which may have been changed with the lcd command).

getrfio RemoteFile LocalFile
Has exactly the same behaviour as the get command except than the remote file is read througth the RFIO system. This needs the daemon bbftpd to be compiled with the RFIO option.

getrfio RemoteFile
Has exactly the same behaviour as the get command except than the remote file is read througth the RFIO system. This needs the daemon bbftpd to be compiled with the RFIO option.

lcd LocalDirectory
Change the current directory on the local host.

If the LocalDirectory is given in relative mode (not beginning by a /), it is searched relative to the directory where the client is currently.

mget RemoteFiles
Expand the RemoteFiles on the remote machine and do a get for each file name thus produced. Files are transferred into the local working directory, which can be changed with lcd LocalDirectory

mkdir RemoteDirectory
Create the directory RemoteDirectory on the remote host. If the directory already exist no retry is done and the next command of the file is processed. If the RemoteDirectory is given in relative mode (not beginning by a /) the directory is created relative to the current remote directory.

If one directory in the path given does not exist the command fail and no retry is done.

mput LocalFiles
Expand wild cards in the list of local files given as arguments and do a put for each file in the resulting list.

put LocalFile RemoteFile
Transfer the local file LocalFile to the remote host with the name RemoteFile. If the remote file already exists it is overwritten. Under some circumstances (No space left on device, Access denied ...), no retry is done and the next command of the file is processed.

If the LocalFile is given in relative mode (not beginning by a /) the file is searched relative to the directory where the bbftpc 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).

put LocalFile
Transfer the local file LocalFile to the remote host with the name LocalFile.

If the LocalFile is given in relative mode (not beginning by a /) the file is searched relative to the directory where the bbftpc 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).

putrfio LocalFile RemoteFile
Has exactly the same behaviour as the put command except than the local file is read througth the RFIO system. This needs the bbftpcd daemon and bbftpc command to be compiled with the RFIO option.

putrfio LocalFile
Has exactly the same behaviour as the put command except than the local file is read througth the RFIO system. This needs the bbftpcd daemon and bbftpc command to be compiled with the RFIO option.

WARNING
Do not believe that the transfer is ended because the new file ( RemoteFile for a put or LocalFile for a get) has the expected size, IT IS CREATED WITH ITS EXPECTED SIZE AT THE BEGINNING OF THE TRANSFER. Look at the standard output or at the result file to know if the transfer has finished correctly.

NOTES
On SunOS, IRIX and OSF1 all transfer commands (except getrfio) are able to transfer files of more than 2 Gigabytes.

On Linux all transfer commands are limited to files of 2 Gigabytes.

 

RESULT FILE FORMAT

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.
    

EXAMPLE

If the following control file named ctrlfile:

mkdir /scratch/jon
put /home/user/f1 /scratch/jon/f1
put f2 f3
get f4 /tmp/f5

has to be used. The first thing to do is to run a bbftpcd command like

bbftpcd -u jon host2

which will return a magic number like 5800 (the pid of the process running).

Then the command to start the transfer will be

bbftpc -i ctrlfile -p 5 -c - m 5800

This mean that the bbftpc command will used the ControlFile ctrlfile to execute several commands. All transfer commands will be done in compressed mode with five streams.

Commands 1 and 2 are done in absolute mode. Commands 3 is done relative to the directory where the bbftpc 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.

 

RETURN VALUES

No return value is given if a ControlFile is used. In this case see the ResultFile or the standard output.

If a single command is used then bbftpc return -1 in case of failure and 0 in case of success.

 

MESSAGES AND ERRORS

Informative and error messages are written to the standard output file.

 

SEE ALSO

bbftp(1),bbftpcd(1)

 

AUTHOR

bbftpc was developed by Gilles Farrache (farrache@cc.in2p3.fr) at the Centre de Calcul de l'IN2P3 - Villeurbanne (FRANCE).


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
CONTROL FILE FORMAT
RESULT FILE FORMAT
EXAMPLE
RETURN VALUES
MESSAGES AND ERRORS
SEE ALSO
AUTHOR

This document was created by man2html, using the manual pages.
Time: 09:43:12 GMT, August 28, 2000