qftp.html 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
  2. <html>
  3. <head>
  4. <title>qftp</title>
  5. <link rel="stylesheet" type="text/css" href="doc.css">
  6. </head>
  7. <body>
  8. <h1>qftp</h1>
  9. <p><i>qftp</i> is a utility that performs file transfers using
  10. <i>ftplib</i> based on instructions presented on the command
  11. line.</p>
  12. <h2>Format</h2>
  13. <pre>
  14. qftp &lt;action&gt; &lt;host&gt; [ -l user [ -p pass ] ] { options/files }...
  15. Actions: send, get, dir, list, rm
  16. Options:
  17. -v level Set verbosity
  18. -r rootpath Change remote working directory
  19. -m umask Set umask for created files
  20. -a | -i Set ascii/image transfer mode
  21. -w Toggle wildcard mode
  22. -s cmd Send cmd as a SITE command
  23. -b Toggle stripping of path from filename
  24. on send
  25. </pre>
  26. <dl>
  27. <dt>action</dt>
  28. <dd>Specifies what <i>qftp</i> is to do. <i>qftp</i> can
  29. <b>send</b> files to a remote system, <b>get</b> files from a
  30. remote system, remove (<b>rm</b>) files from a remote system, or
  31. retreive a <b>dir</b>ectory of files or a <b>list</b> of files on a
  32. remote system.</dd>
  33. <dt>host</dt>
  34. <dd>Specifies the name of the remote system. An alternate port may
  35. be specified by appending a colon and the port name or number to
  36. the host name.</dd>
  37. <dt>-l user</dt>
  38. <dd>Specifies the username to log in with on <b>host</b>.</dd>
  39. <dt>-p pass</dt>
  40. <dd>Specifies the password to log in with on <b>host</b>.
  41. <p>If <b>user</b> is not specified, <i>qftp</i> will use
  42. <b>anonymous</b>. If <b>pass</b> is also not specified, <i>qftp</i>
  43. attempts to build a password from the translation of the
  44. environment variable "USER" and the string returned by
  45. gethostname() separated by an "@".</p>
  46. </dd>
  47. <dt>-v level</dt>
  48. <dd>Specifies the verbosity level. A level of 1 will cause
  49. <i>qftp</i> to display messages indicating successful transfers. A
  50. level of 2 will cause FTP protocol responses to be displayed. A
  51. level of 3 will cause FTP protocol commands to be displayed.</dd>
  52. <dt>-r rootpath</dt>
  53. <dd>Sends a 'change directory' request to the remote server. All
  54. subsequent file names on the command line will be parsed relative
  55. to this new directory.</dd>
  56. <dt>-m umask</dt>
  57. <dd>Sends a request to change the umask to the remote server. This
  58. may not be supported by all servers. It is implemented using the
  59. 'SITE' command in the FTP protocol.</dd>
  60. <dt>-a</dt>
  61. <dd>Requests that subsequent files be sent in ascii mode.</dd>
  62. <dt>-i</dt>
  63. <dd>Requests that subsequent files be sent in image mode.</dd>
  64. <dt>-w</dt>
  65. <dd>Toggles handling of filenames to get as wildcards. When a
  66. wildcard filename is encountered it is passed to the server in a
  67. NLST (brief directory) command. qftp will save the list of files
  68. returned and then retrieve each file individually.</dd>
  69. <dt>-s cmd</dt>
  70. <dd>Sends cmd in a SITE command. This can be useful to alter the way
  71. filenames are presented. For example, an OpenVMS FTP server will
  72. strip version numbers from file names after receiving a 'SITE UNIX'
  73. command.</dd>
  74. <dt>-b</dt>
  75. <dd>Toggles stripping of paths from filenames on send. By default,
  76. qftp passes the full path of the input file as specified on the
  77. command line to the remote FTP server as the target filename. This
  78. option will cause qftp to send only the basename of the file.</dd>
  79. </dl>
  80. <p><i>qftp</i> reads the command line argument by argument and acts on
  81. each as it comes to it. Most options only change the value of a
  82. variable. The '-m' (umask), '-s' (site), and '-r' (change
  83. directory) options are executed immediately by sending the command
  84. to the server. The '-a' (ascii) and '-i' (image) options save the
  85. type for subsequent transfers. When a filename is encountered it
  86. is sent to the server with the command for the selected action.</p>
  87. <p>It is possible to send multiple files with different modes on the
  88. same command line. For example, the following command will send all
  89. text files in ascii mode and all zip files in image mode:</p>
  90. <pre>
  91. qftp send srvr -a *.txt -i *.zip
  92. </pre>
  93. <p><i>qftp</i> may optionally be invoked through a softlink.
  94. <i>qftp</i> searches the command which invoked it for 'send', 'get'
  95. or 'dir' and, if found, performs the requested function. In this
  96. case, leave off the <b>action</b> argument on the command line.</p>
  97. <p>For example; create the following softlinks:</p>
  98. <pre>
  99. ln -s qftp ftpsend
  100. ln -s qftp ftpget
  101. ln -s qftp ftpdir
  102. ln -s qftp ftplist
  103. ln -s qftp ftprm
  104. </pre>
  105. <p>and then invoke transfers with 'ftpsend' instead of 'qftp send',
  106. etc.</p>
  107. <p>If no file names are specified on the command line, <i>qftp</i>
  108. will read file names from stdin. Use your favorite utility to
  109. generate a list of files to send/retreive or type them
  110. interactively.</p>
  111. </body>
  112. </html>