qftp

qftp is a utility that performs file transfers using ftplib based on instructions presented on the command line.

Format

    qftp <action> <host> [ -l user [ -p pass ] ] { options/files }...

    Actions: send, get, dir, list, rm

    Options:
        -v level        Set verbosity
        -r rootpath     Change remote working directory
	-m umask        Set umask for created files
        -a | -i         Set ascii/image transfer mode
action
Specifies what qftp is to do. qftp can send files to a remote system, get files from a remote system, remove (rm) files from a remote system, or retreive a directory of files or a list of files on a remote system.
host
Specifies the name of the remote system. An alternate port may be specified by appending a colon and the port name or number to the host name.
-l user
Specifies the username to log in with on host.
-p pass
Specifies the password to log in with on host.

If user is not specified, qftp will use anonymous. If pass is also not specified, qftp attempts to build a password from the translation of the environment variable "USER" and the string returned by gethostname() separated by an "@".

-v level
Specifies the verbosity level. A level of 1 will cause qftp to display messages indicating successful transfers. A level of 2 will cause FTP protocol responses to be displayed. A level of 3 will cause FTP protocol commands to be displayed.
-r rootpath
Sends a 'change directory' request to the remote server. All subsequent file names on the command line will be parsed relative to this new directory.
-m umask
Sends a request to change the umask to the remote server. This may not be supported by all servers. It is implemented using the 'SITE' command in the FTP protocol.
-a
Requests that subsequent files be sent in ascii mode.
-i
Requests that subsequent files be sent in image mode.

qftp may optionally be invoked through a softlink. qftp searches the command which invoked it for 'send', 'get' or 'dir' and, if found, performs the requested function. In this case, leave off the action argument on the command line.

For example; I use the following softlinks:

    ln -s qftp ftpsend
    ln -s qftp ftpget
    ln -s qftp ftpdir
    ln -s qftp ftplist
    ln -s qftp ftprm

and then invoke transfers with 'ftpsend' instead of 'qftp send', etc.

If no file names are specified on the command line, qftp will read file names from stdin. Use your favorite utility to generate a list of files to send/retreive or type them interactively.