Search:
+subject: ftpc - command line FTP client

FTPC(1)                                                   FTPC(1)



NAME
       ftpc - command line FTP client

SYNOPSIS
       ftpc [options] server[:port] [filename ...]
       ftpc [options] url

DESCRIPTION
       ftpc  is  a non interactive FTP client.  It logs in to the
       addressed server and performs the given command, get,  put
       or ls (se below for the complete list), on the given file-
       name arguments.  If no filename is given  on  the  command
       line  ftpc  performs a `LIST' command otherwise, if one or
       more filenames are found the default operation is  `RETR'.
       These defaults can be overridden with the -c option.

   File Locations
       If a filename parameter includes directory information the
       parameter is sent to the server as-is without doing a  CWD
       before.   The  directory  portion is ignored for the local
       file location.  In other words, ftpc  operates  always  on
       files in the current directory.

   Supported Commands
       ftpc  supports  the  following commands (given with the -c
       option):

       del filename ...
              delete the given files from the server.

       get filename ...
              retrieve files from the server and store it in  the
              current directory.

       list dir ...
              lists the given directories.

       mkdir dir ...
              creates directory dir.

       mtime dir ...
              prints  for each file in dir it's last modification
              time and size as returned by the MDTM and SIZE com-
              mand.

       nlist dir ...
              lists the filenames in dir.

       put filename ...
              store files from the local directory on the server.

       rename filename newname
              rename filename to newname.

       retr remote local
              retrieve the file remote from the server and  store
              it as local.

       rmdir dir ...
              deletes directory dir.

       site cmd ...
              executes  SITE  command  cmd  on the FTP server and
              displays the output `as-is'.

       stor local remote
              store the local file local as remote on the server.

       Notice  that  ftpc  ignores  the  directory part for local
       selection for the get and put command.  For retr and  stor
       the  local directory part is used.  Furthermore, the local
       filename can be a dash `-' in which case  ftpc's  standard
       input or output is used.

   Filename Globbing
       Remote filename globbing (pattern expansion) can be turned
       on with the -g option.  In this case the filename  argumu-
       ments are expanded through the FTP server's `NLST' command
       first to get the list of files to be transfered.  Filename
       globbing works only for the get command.

   Piping
       If  the  -p  option is given on the command line ftpc uses
       stdin or stdout as the local file.  Only a single file can
       be transfered in pipe mode.

   Authentication
       The  remote  username and password may be specified on the
       command line with the -l option

         -l username[:password].

       or as part of an URL.  If the username is not  given  ftpc
       uses the local username under which it is running as login
       name for the remote server.  The password is looked up  in
       the  local  user's ~/.netrc if necessary and read from the
       tty if not found there.  Notice  that  the  ~/.netrc  must
       have  the  file permissions `600'.  Otherwise ftpc refuses
       to use it.

   URL Addressing
       ftpc accepts also URLs of the form

         ftp://[user[:password]@]server[:port]/[location]

       as file specification.  If URL addressing is used  only  a
       single file can be transfered.

OPTIONS
       The following options are available:

       -a     forces  ASCII  transfer  of files instead of binary
              which is the default.

       -c command
              specifies the FTP command, see above for  the  com-
              plete  list.   The  default command is `LIST' if no
              file argument is given and `RETR' otherwise.

       -d directory
              change to directory on  the  FTP  server.   The  -d
              option  can be specified more than once.  If two or
              more (up to five are accepted) directories are  set
              ftpc  will  change  into  them  in  the given order
              before performing the FTP command.

       -g     turns filename globbing for file retrievals on.

       -i     ignores the ~/.netrc for user account  information.

       -l user[:password]
              use  user  and password to login to the FTP server.
              If the -l argument is a dash `-' ftpi will use  the
              value  of  the  environment  variable  FTPC_AUTH as
              argument.

       -o lsopts
              specifies options to the LIST and NLST commands.

       -p     sets pipe mode: stdin or stdout is  used  as  local
              file.

       -q | -qq filename
              sets  auto-listmode,  after the requested operation
              has been done, ftpc retrieves an updated listing of
              the  server's directory.  The listing is written to
              filename if -q is given twice.

       -v     sets the verbose mode, ftpc writes what it is doing
              to  stderr.   If -v is given twice ftpc switches to
              debug mode, the whole FTP conversation  is  written
              instead.

       -y     tells  ftpc to use passive mode for data transfers.

       -z size
              sets  the  transfer  buffer  size  to  size   bytes
              (default 1024).


SEE ALSO
       ftp.server(1), ftp.proxy(1), various other FTP programs.



                           22 JULY 2000                   FTPC(1)