remove gcc34
[dragonfly.git] / crypto / heimdal-0.6.3 / appl / ftp / ftp / ftp.cat1
1
2 FTP(1)                       UNIX Reference Manual                      FTP(1)
3
4 N\bNA\bAM\bME\bE
5      f\bft\btp\bp - ARPANET file transfer program
6
7 S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
8      f\bft\btp\bp [-\b-t\bt] [-\b-v\bv] [-\b-d\bd] [-\b-i\bi] [-\b-n\bn] [-\b-g\bg] [-\b-p\bp] [-\b-l\bl] [-\b--\b-n\bno\bo-\b-g\bgs\bss\bs-\b-b\bbi\bin\bnd\bdi\bin\bng\bgs\bs] [_\bh_\bo_\bs_\bt]
9
10 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
11      F\bFt\btp\bp is the user interface to the ARPANET standard File Transfer Protocol.
12      The program allows a user to transfer files to and from a remote network
13      site.
14
15      Modifications has been made so that it almost follows the ftpsec Internet
16      draft.
17
18      Options may be specified at the command line, or to the command inter-
19      preter.
20
21      -\b-t\bt    Enables packet tracing.
22
23      -\b-v\bv    Verbose option forces f\bft\btp\bp to show all responses from the remote
24            server, as well as report on data transfer statistics.
25
26      -\b-n\bn    Restrains f\bft\btp\bp from attempting ``auto-login'' upon initial connec-
27            tion.  If auto-login is enabled, f\bft\btp\bp will check the _\b._\bn_\be_\bt_\br_\bc (see be-
28            low) file in the user's home directory for an entry describing an
29            account on the remote machine.  If no entry exists, f\bft\btp\bp will prompt
30            for the remote machine login name (default is the user identity on
31            the local machine), and, if necessary, prompt for a password and an
32            account with which to login.
33
34      -\b-i\bi    Turns off interactive prompting during multiple file transfers.
35
36      -\b-p\bp    Turn on passive mode.
37
38      -\b-d\bd    Enables debugging.
39
40      -\b-g\bg    Disables file name globbing.
41
42      -\b--\b-n\bno\bo-\b-g\bgs\bss\bs-\b-b\bbi\bin\bnd\bdi\bin\bng\bgs\bs
43            use GSS-API bindings when talking to peer (ie make sure IP address-
44            es match).
45
46      -\b-l\bl    Disables command line editing.
47
48      The client host with which f\bft\btp\bp is to communicate may be specified on the
49      command line.  If this is done, f\bft\btp\bp will immediately attempt to establish
50      a connection to an FTP server on that host; otherwise, f\bft\btp\bp will enter its
51      command interpreter and await instructions from the user.  When f\bft\btp\bp is
52      awaiting commands from the user the prompt `ftp>' is provided to the us-
53      er.  The following commands are recognized by f\bft\btp\bp:
54
55      !\b! [_\bc_\bo_\bm_\bm_\ba_\bn_\bd [_\ba_\br_\bg_\bs]]
56                  Invoke an interactive shell on the local machine.  If there
57                  are arguments, the first is taken to be a command to execute
58                  directly, with the rest of the arguments as its arguments.
59
60      $\b$ _\bm_\ba_\bc_\br_\bo_\b-_\bn_\ba_\bm_\be [_\ba_\br_\bg_\bs]
61                  Execute the macro _\bm_\ba_\bc_\br_\bo_\b-_\bn_\ba_\bm_\be that was defined with the m\bma\bac\bcd\bde\bef\bf
62                  command.  Arguments are passed to the macro unglobbed.
63
64      a\bac\bcc\bco\bou\bun\bnt\bt [_\bp_\ba_\bs_\bs_\bw_\bd]
65                  Supply a supplemental password required by a remote system
66                  for access to resources once a login has been successfully
67                  completed.  If no argument is included, the user will be
68                  prompted for an account password in a non-echoing input mode.
69
70      a\bap\bpp\bpe\ben\bnd\bd _\bl_\bo_\bc_\ba_\bl_\b-_\bf_\bi_\bl_\be [_\br_\be_\bm_\bo_\bt_\be_\b-_\bf_\bi_\bl_\be]
71                  Append a local file to a file on the remote machine.  If
72                  _\br_\be_\bm_\bo_\bt_\be_\b-_\bf_\bi_\bl_\be is left unspecified, the local file name is used
73                  in naming the remote file after being altered by any n\bnt\btr\bra\ban\bns\bs
74                  or n\bnm\bma\bap\bp setting.  File transfer uses the current settings for
75                  t\bty\byp\bpe\be, f\bfo\bor\brm\bma\bat\bt, m\bmo\bod\bde\be, and s\bst\btr\bru\buc\bct\btu\bur\bre\be.
76
77      a\bas\bsc\bci\bii\bi       Set the file transfer t\bty\byp\bpe\be to network ASCII. This is the de-
78                  fault type.
79
80      b\bbe\bel\bll\bl        Arrange that a bell be sounded after each file transfer com-
81                  mand is completed.
82
83      b\bbi\bin\bna\bar\bry\by      Set the file transfer t\bty\byp\bpe\be to support binary image transfer.
84
85      b\bby\bye\be         Terminate the FTP session with the remote server and exit
86                  f\bft\btp\bp. An end of file will also terminate the session and exit.
87
88      c\bca\bas\bse\be        Toggle remote computer file name case mapping during m\bmg\bge\bet\bt
89                  commands.  When c\bca\bas\bse\be is on (default is off), remote computer
90                  file names with all letters in upper case are written in the
91                  local directory with the letters mapped to lower case.
92
93      c\bcd\bd _\br_\be_\bm_\bo_\bt_\be_\b-_\bd_\bi_\br_\be_\bc_\bt_\bo_\br_\by
94                  Change the working directory on the remote machine to _\br_\be_\bm_\bo_\bt_\be_\b-
95                  _\bd_\bi_\br_\be_\bc_\bt_\bo_\br_\by.
96
97      c\bcd\bdu\bup\bp        Change the remote machine working directory to the parent of
98                  the current remote machine working directory.
99
100      c\bch\bhm\bmo\bod\bd _\bm_\bo_\bd_\be _\bf_\bi_\bl_\be_\b-_\bn_\ba_\bm_\be
101                  Change the permission modes of the file _\bf_\bi_\bl_\be_\b-_\bn_\ba_\bm_\be on the re-
102                  mote sytem to _\bm_\bo_\bd_\be.
103
104      c\bcl\blo\bos\bse\be       Terminate the FTP session with the remote server, and return
105                  to the command interpreter.  Any defined macros are erased.
106
107      c\bcr\br          Toggle carriage return stripping during ascii type file re-
108                  trieval.  Records are denoted by a carriage return/linefeed
109                  sequence during ascii type file transfer.  When c\bcr\br is on (the
110                  default), carriage returns are stripped from this sequence to
111                  conform with the UNIX single linefeed record delimiter.
112                  Records on non-UNIX remote systems may contain single line-
113                  feeds; when an ascii type transfer is made, these linefeeds
114                  may be distinguished from a record delimiter only when c\bcr\br is
115                  off.
116
117      d\bde\bel\ble\bet\bte\be _\br_\be_\bm_\bo_\bt_\be_\b-_\bf_\bi_\bl_\be
118                  Delete the file _\br_\be_\bm_\bo_\bt_\be_\b-_\bf_\bi_\bl_\be on the remote machine.
119
120      d\bde\beb\bbu\bug\bg [_\bd_\be_\bb_\bu_\bg_\b-_\bv_\ba_\bl_\bu_\be]
121                  Toggle debugging mode.  If an optional _\bd_\be_\bb_\bu_\bg_\b-_\bv_\ba_\bl_\bu_\be is speci-
122                  fied it is used to set the debugging level.  When debugging
123                  is on, f\bft\btp\bp prints each command sent to the remote machine,
124                  preceded by the string `-->'
125
126      d\bdi\bir\br [_\br_\be_\bm_\bo_\bt_\be_\b-_\bd_\bi_\br_\be_\bc_\bt_\bo_\br_\by] [_\bl_\bo_\bc_\ba_\bl_\b-_\bf_\bi_\bl_\be]
127                  Print a listing of the directory contents in the directory,
128                  _\br_\be_\bm_\bo_\bt_\be_\b-_\bd_\bi_\br_\be_\bc_\bt_\bo_\br_\by, and, optionally, placing the output in
129                  _\bl_\bo_\bc_\ba_\bl_\b-_\bf_\bi_\bl_\be. If interactive prompting is on, f\bft\btp\bp will prompt
130                  the user to verify that the last argument is indeed the tar-
131                  get local file for receiving d\bdi\bir\br output.  If no directory is
132                  specified, the current working directory on the remote ma-
133                  chine is used.  If no local file is specified, or _\bl_\bo_\bc_\ba_\bl_\b-_\bf_\bi_\bl_\be
134                  is -\b-, output comes to the terminal.
135
136      d\bdi\bis\bsc\bco\bon\bnn\bne\bec\bct\bt  A synonym for _\bc_\bl_\bo_\bs_\be.
137
138      f\bfo\bor\brm\bm _\bf_\bo_\br_\bm_\ba_\bt
139                  Set the file transfer f\bfo\bor\brm\bm to _\bf_\bo_\br_\bm_\ba_\bt. The default format is
140                  ``file''.
141
142      g\bge\bet\bt _\br_\be_\bm_\bo_\bt_\be_\b-_\bf_\bi_\bl_\be [_\bl_\bo_\bc_\ba_\bl_\b-_\bf_\bi_\bl_\be]
143                  Retrieve the _\br_\be_\bm_\bo_\bt_\be_\b-_\bf_\bi_\bl_\be and store it on the local machine.
144                  If the local file name is not specified, it is given the same
145                  name it has on the remote machine, subject to alteration by
146                  the current c\bca\bas\bse\be, n\bnt\btr\bra\ban\bns\bs, and n\bnm\bma\bap\bp settings.  The current
147                  settings for t\bty\byp\bpe\be, f\bfo\bor\brm\bm, m\bmo\bod\bde\be, and s\bst\btr\bru\buc\bct\btu\bur\bre\be are used while
148                  transferring the file.
149
150      g\bgl\blo\bob\bb        Toggle filename expansion for m\bmd\bde\bel\ble\bet\bte\be, m\bmg\bge\bet\bt and m\bmp\bpu\but\bt. If
151                  globbing is turned off with g\bgl\blo\bob\bb, the file name arguments are
152                  taken literally and not expanded.  Globbing for m\bmp\bpu\but\bt is done
153                  as in csh(1).  For m\bmd\bde\bel\ble\bet\bte\be and m\bmg\bge\bet\bt, each remote file name is
154                  expanded separately on the remote machine and the lists are
155                  not merged.  Expansion of a directory name is likely to be
156                  different from expansion of the name of an ordinary file: the
157                  exact result depends on the foreign operating system and ftp
158                  server, and can be previewed by doing `mls remote-files -'.
159                  As a security measure, remotely globbed files that starts
160                  with `/' or contains `../', will not be automatically re-
161                  ceived. If you have interactive prompting turned off, these
162                  filenames will be ignored.  Note: m\bmg\bge\bet\bt and m\bmp\bpu\but\bt are not meant
163                  to transfer entire directory subtrees of files.  That can be
164                  done by transferring a tar(1) archive of the subtree (in bi-
165                  nary mode).
166
167      h\bha\bas\bsh\bh        Toggle hash-sign (``#'') printing for each data block trans-
168                  ferred.  The size of a data block is 1024 bytes.
169
170      h\bhe\bel\blp\bp [_\bc_\bo_\bm_\bm_\ba_\bn_\bd]
171                  Print an informative message about the meaning of _\bc_\bo_\bm_\bm_\ba_\bn_\bd. If
172                  no argument is given, f\bft\btp\bp prints a list of the known com-
173                  mands.
174
175      i\bid\bdl\ble\be [_\bs_\be_\bc_\bo_\bn_\bd_\bs]
176                  Set the inactivity timer on the remote server to _\bs_\be_\bc_\bo_\bn_\bd_\bs sec-
177                  onds.  If _\bs_\be_\bc_\bo_\bn_\bd_\bs is omitted, the current inactivity timer is
178                  printed.
179
180      l\blc\bcd\bd [_\bd_\bi_\br_\be_\bc_\bt_\bo_\br_\by]
181                  Change the working directory on the local machine.  If no
182                  _\bd_\bi_\br_\be_\bc_\bt_\bo_\br_\by is specified, the user's home directory is used.
183
184      l\bls\bs [_\br_\be_\bm_\bo_\bt_\be_\b-_\bd_\bi_\br_\be_\bc_\bt_\bo_\br_\by] [_\bl_\bo_\bc_\ba_\bl_\b-_\bf_\bi_\bl_\be]
185                  Print a listing of the contents of a directory on the remote
186                  machine.  The listing includes any system-dependent informa-
187                  tion that the server chooses to include; for example, most
188                  UNIX systems will produce output from the command `ls -l'.
189                  (See also n\bnl\bli\bis\bst\bt.) If _\br_\be_\bm_\bo_\bt_\be_\b-_\bd_\bi_\br_\be_\bc_\bt_\bo_\br_\by is left unspecified,
190                  the current working directory is used.  If interactive
191                  prompting is on, f\bft\btp\bp will prompt the user to verify that the
192                  last argument is indeed the target local file for receiving
193                  l\bls\bs output.  If no local file is specified, or if _\bl_\bo_\bc_\ba_\bl_\b-_\bf_\bi_\bl_\be
194                  is `-\b-', the output is sent to the terminal.
195
196      m\bma\bac\bcd\bde\bef\bf _\bm_\ba_\bc_\br_\bo_\b-_\bn_\ba_\bm_\be
197                  Define a macro.  Subsequent lines are stored as the macro
198                  _\bm_\ba_\bc_\br_\bo_\b-_\bn_\ba_\bm_\be; a null line (consecutive newline characters in a
199                  file or carriage returns from the terminal) terminates macro
200                  input mode.  There is a limit of 16 macros and 4096 total
201                  characters in all defined macros.  Macros remain defined un-
202                  til a c\bcl\blo\bos\bse\be command is executed.  The macro processor inter-
203                  prets `$' and `\' as special characters.  A `$' followed by a
204                  number (or numbers) is replaced by the corresponding argument
205                  on the macro invocation command line.  A `$' followed by an
206                  `i' signals that macro processor that the executing macro is
207                  to be looped.  On the first pass `$i' is replaced by the
208                  first argument on the macro invocation command line, on the
209                  second pass it is replaced by the second argument, and so on.
210                  A `\' followed by any character is replaced by that charac-
211                  ter.  Use the `\' to prevent special treatment of the `$'.
212
213      m\bmd\bde\bel\ble\bet\bte\be [_\br_\be_\bm_\bo_\bt_\be_\b-_\bf_\bi_\bl_\be_\bs]
214                  Delete the _\br_\be_\bm_\bo_\bt_\be_\b-_\bf_\bi_\bl_\be_\bs on the remote machine.
215
216      m\bmd\bdi\bir\br _\br_\be_\bm_\bo_\bt_\be_\b-_\bf_\bi_\bl_\be_\bs _\bl_\bo_\bc_\ba_\bl_\b-_\bf_\bi_\bl_\be
217                  Like d\bdi\bir\br, except multiple remote files may be specified.  If
218                  interactive prompting is on, f\bft\btp\bp will prompt the user to ver-
219                  ify that the last argument is indeed the target local file
220                  for receiving m\bmd\bdi\bir\br output.
221
222      m\bmg\bge\bet\bt _\br_\be_\bm_\bo_\bt_\be_\b-_\bf_\bi_\bl_\be_\bs
223                  Expand the _\br_\be_\bm_\bo_\bt_\be_\b-_\bf_\bi_\bl_\be_\bs on the remote machine and do a g\bge\bet\bt
224                  for each file name thus produced.  See g\bgl\blo\bob\bb for details on
225                  the filename expansion.  Resulting file names will then be
226                  processed according to c\bca\bas\bse\be, n\bnt\btr\bra\ban\bns\bs, and n\bnm\bma\bap\bp settings.
227                  Files are transferred into the local working directory, which
228                  can be changed with `lcd directory'; new local directories
229                  can be created with `! mkdir directory'.
230
231      m\bmk\bkd\bdi\bir\br _\bd_\bi_\br_\be_\bc_\bt_\bo_\br_\by_\b-_\bn_\ba_\bm_\be
232                  Make a directory on the remote machine.
233
234      m\bml\bls\bs _\br_\be_\bm_\bo_\bt_\be_\b-_\bf_\bi_\bl_\be_\bs _\bl_\bo_\bc_\ba_\bl_\b-_\bf_\bi_\bl_\be
235                  Like n\bnl\bli\bis\bst\bt, except multiple remote files may be specified,
236                  and the _\bl_\bo_\bc_\ba_\bl_\b-_\bf_\bi_\bl_\be must be specified.  If interactive prompt-
237                  ing is on, f\bft\btp\bp will prompt the user to verify that the last
238                  argument is indeed the target local file for receiving m\bml\bls\bs
239                  output.
240
241      m\bmo\bod\bde\be [_\bm_\bo_\bd_\be_\b-_\bn_\ba_\bm_\be]
242                  Set the file transfer m\bmo\bod\bde\be to _\bm_\bo_\bd_\be_\b-_\bn_\ba_\bm_\be. The default mode is
243                  ``stream'' mode.
244
245      m\bmo\bod\bdt\bti\bim\bme\be _\bf_\bi_\bl_\be_\b-_\bn_\ba_\bm_\be
246                  Show the last modification time of the file on the remote ma-
247                  chine.
248
249      m\bmp\bpu\but\bt _\bl_\bo_\bc_\ba_\bl_\b-_\bf_\bi_\bl_\be_\bs
250                  Expand wild cards in the list of local files given as argu-
251                  ments and do a p\bpu\but\bt for each file in the resulting list.  See
252                  g\bgl\blo\bob\bb for details of filename expansion.  Resulting file names
253                  will then be processed according to n\bnt\btr\bra\ban\bns\bs and n\bnm\bma\bap\bp settings.
254
255      n\bne\bew\bwe\ber\br _\bf_\bi_\bl_\be_\b-_\bn_\ba_\bm_\be
256                  Get the file only if the modification time of the remote file
257                  is more recent that the file on the current system.  If the
258                  file does not exist on the current system, the remote file is
259                  considered n\bne\bew\bwe\ber\br. Otherwise, this command is identical to
260                  _\bg_\be_\bt.
261
262      n\bnl\bli\bis\bst\bt [_\br_\be_\bm_\bo_\bt_\be_\b-_\bd_\bi_\br_\be_\bc_\bt_\bo_\br_\by] [_\bl_\bo_\bc_\ba_\bl_\b-_\bf_\bi_\bl_\be]
263                  Print a  list of the files in a directory on the remote ma-
264                  chine.  If _\br_\be_\bm_\bo_\bt_\be_\b-_\bd_\bi_\br_\be_\bc_\bt_\bo_\br_\by is left unspecified, the current
265                  working directory is used.  If interactive prompting is on,
266                  f\bft\btp\bp will prompt the user to verify that the last argument is
267                  indeed the target local file for receiving n\bnl\bli\bis\bst\bt output.  If
268                  no local file is specified, or if _\bl_\bo_\bc_\ba_\bl_\b-_\bf_\bi_\bl_\be is -\b-, the output
269                  is sent to the terminal.
270
271      n\bnm\bma\bap\bp [_\bi_\bn_\bp_\ba_\bt_\bt_\be_\br_\bn _\bo_\bu_\bt_\bp_\ba_\bt_\bt_\be_\br_\bn]
272                  Set or unset the filename mapping mechanism.  If no arguments
273                  are specified, the filename mapping mechanism is unset.  If
274                  arguments are specified, remote filenames are mapped during
275                  m\bmp\bpu\but\bt commands and p\bpu\but\bt commands issued without a specified re-
276                  mote target filename.  If arguments are specified, local
277                  filenames are mapped during m\bmg\bge\bet\bt commands and g\bge\bet\bt commands
278                  issued without a specified local target filename.  This com-
279                  mand is useful when connecting to a non-UNIX remote computer
280                  with different file naming conventions or practices.  The
281                  mapping follows the pattern set by _\bi_\bn_\bp_\ba_\bt_\bt_\be_\br_\bn and _\bo_\bu_\bt_\bp_\ba_\bt_\bt_\be_\br_\bn.
282                  [_\bI_\bn_\bp_\ba_\bt_\bt_\be_\br_\bn] is a template for incoming filenames (which may
283                  have already been processed according to the n\bnt\btr\bra\ban\bns\bs and c\bca\bas\bse\be
284                  settings).  Variable templating is accomplished by including
285                  the sequences `$1', `$2', ..., `$9' in _\bi_\bn_\bp_\ba_\bt_\bt_\be_\br_\bn. Use `\' to
286                  prevent this special treatment of the `$' character.  All
287                  other characters are treated literally, and are used to de-
288                  termine the n\bnm\bma\bap\bp [_\bi_\bn_\bp_\ba_\bt_\bt_\be_\br_\bn] variable values.  For example,
289                  given _\bi_\bn_\bp_\ba_\bt_\bt_\be_\br_\bn $1.$2 and the remote file name "mydata.data",
290                  $1 would have the value "mydata", and $2 would have the value
291                  "data".  The _\bo_\bu_\bt_\bp_\ba_\bt_\bt_\be_\br_\bn determines the resulting mapped file-
292                  name.  The sequences `$1', `$2', ...., `$9' are replaced by
293                  any value resulting from the _\bi_\bn_\bp_\ba_\bt_\bt_\be_\br_\bn template.  The se-
294                  quence `$0' is replace by the original filename.  Additional-
295                  ly, the sequence `[_\bs_\be_\bq_\b1, _\bs_\be_\bq_\b2]' is replaced by [_\bs_\be_\bq_\b1] if _\bs_\be_\bq_\b1
296                  is not a null string; otherwise it is replaced by _\bs_\be_\bq_\b2. For
297                  example, the command
298
299                        nmap $1.$2.$3 [$1,$2].[$2,file]
300
301                  would yield the output filename "myfile.data" for input file-
302                  names "myfile.data" and "myfile.data.old", "myfile.file" for
303                  the input filename "myfile", and "myfile.myfile" for the in-
304                  put filename ".myfile".  Spaces may be included in
305                  _\bo_\bu_\bt_\bp_\ba_\bt_\bt_\be_\br_\bn, as in the example: `nmap $1 sed "s/  *$//" > $1'
306                  .  Use the `\' character to prevent special treatment of the
307                  `$','[','[', and `,' characters.
308
309      n\bnt\btr\bra\ban\bns\bs [_\bi_\bn_\bc_\bh_\ba_\br_\bs [_\bo_\bu_\bt_\bc_\bh_\ba_\br_\bs]]
310                  Set or unset the filename character translation mechanism.
311                  If no arguments are specified, the filename character trans-
312                  lation mechanism is unset.  If arguments are specified, char-
313                  acters in remote filenames are translated during m\bmp\bpu\but\bt com-
314                  mands and p\bpu\but\bt commands issued without a specified remote tar-
315                  get filename.  If arguments are specified, characters in lo-
316                  cal filenames are translated during m\bmg\bge\bet\bt commands and g\bge\bet\bt
317                  commands issued without a specified local target filename.
318                  This command is useful when connecting to a non-UNIX remote
319                  computer with different file naming conventions or practices.
320                  Characters in a filename matching a character in _\bi_\bn_\bc_\bh_\ba_\br_\bs are
321                  replaced with the corresponding character in _\bo_\bu_\bt_\bc_\bh_\ba_\br_\bs. If the
322                  character's position in _\bi_\bn_\bc_\bh_\ba_\br_\bs is longer than the length of
323                  _\bo_\bu_\bt_\bc_\bh_\ba_\br_\bs, the character is deleted from the file name.
324
325      o\bop\bpe\ben\bn _\bh_\bo_\bs_\bt [_\bp_\bo_\br_\bt]
326                  Establish a connection to the specified _\bh_\bo_\bs_\bt FTP server.  An
327                  optional port number may be supplied, in which case, f\bft\btp\bp will
328                  attempt to contact an FTP server at that port.  If the a\bau\but\bto\bo-\b-
329                  l\blo\bog\bgi\bin\bn option is on (default), f\bft\btp\bp will also attempt to auto-
330
331                  matically log the user in to the FTP server (see below).
332
333      p\bpa\bas\bss\bsi\biv\bve\be     Toggle passive mode.  If passive mode is turned on (default
334                  is off), the ftp client will send a PASV command for all data
335                  connections instead of the usual PORT command.  The PASV com-
336                  mand requests that the remote server open a port for the data
337                  connection and return the address of that port.  The remote
338                  server listens on that port and the client connects to it.
339                  When using the more traditional PORT command, the client lis-
340                  tens on a port and sends that address to the remote server,
341                  who connects back to it.  Passive mode is useful when using
342                  f\bft\btp\bp through a gateway router or host that controls the direc-
343                  tionality of traffic.  (Note that though ftp servers are re-
344                  quired to support the PASV command by RFC 1123, some do not.)
345
346      p\bpr\bro\bom\bmp\bpt\bt      Toggle interactive prompting.  Interactive prompting occurs
347                  during multiple file transfers to allow the user to selec-
348                  tively retrieve or store files.  If prompting is turned off
349                  (default is on), any m\bmg\bge\bet\bt or m\bmp\bpu\but\bt will transfer all files,
350                  and any m\bmd\bde\bel\ble\bet\bte\be will delete all files.
351
352      p\bpr\bro\box\bxy\by _\bf_\bt_\bp_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd
353                  Execute an ftp command on a secondary control connection.
354                  This command allows simultaneous connection to two remote ftp
355                  servers for transferring files between the two servers.  The
356                  first p\bpr\bro\box\bxy\by command should be an o\bop\bpe\ben\bn, to establish the sec-
357                  ondary control connection.  Enter the command "proxy ?" to
358                  see other ftp commands executable on the secondary connec-
359                  tion.  The following commands behave differently when pref-
360                  aced by p\bpr\bro\box\bxy\by: o\bop\bpe\ben\bn will not define new macros during the au-
361                  to-login process, c\bcl\blo\bos\bse\be will not erase existing macro defini-
362                  tions, g\bge\bet\bt and m\bmg\bge\bet\bt transfer files from the host on the pri-
363                  mary control connection to the host on the secondary control
364                  connection, and p\bpu\but\bt, m\bmp\bpu\but\bt, and a\bap\bpp\bpe\ben\bnd\bd transfer files from the
365                  host on the secondary control connection to the host on the
366                  primary control connection.  Third party file transfers de-
367                  pend upon support of the ftp protocol PASV command by the
368                  server on the secondary control connection.
369
370      p\bpu\but\bt _\bl_\bo_\bc_\ba_\bl_\b-_\bf_\bi_\bl_\be [_\br_\be_\bm_\bo_\bt_\be_\b-_\bf_\bi_\bl_\be]
371                  Store a local file on the remote machine.  If _\br_\be_\bm_\bo_\bt_\be_\b-_\bf_\bi_\bl_\be is
372                  left unspecified, the local file name is used after process-
373                  ing according to any n\bnt\btr\bra\ban\bns\bs or n\bnm\bma\bap\bp settings in naming the
374                  remote file.  File transfer uses the current settings for
375                  t\bty\byp\bpe\be, f\bfo\bor\brm\bma\bat\bt, m\bmo\bod\bde\be, and s\bst\btr\bru\buc\bct\btu\bur\bre\be.
376
377      p\bpw\bwd\bd         Print the name of the current working directory on the remote
378                  machine.
379
380      q\bqu\bui\bit\bt        A synonym for b\bby\bye\be.
381
382      q\bqu\buo\bot\bte\be _\ba_\br_\bg_\b1 _\ba_\br_\bg_\b2 _\b._\b._\b.
383                  The arguments specified are sent, verbatim, to the remote FTP
384                  server.
385
386      r\bre\bec\bcv\bv _\br_\be_\bm_\bo_\bt_\be_\b-_\bf_\bi_\bl_\be [_\bl_\bo_\bc_\ba_\bl_\b-_\bf_\bi_\bl_\be]
387                  A synonym for get.
388
389      r\bre\beg\bge\bet\bt _\br_\be_\bm_\bo_\bt_\be_\b-_\bf_\bi_\bl_\be [_\bl_\bo_\bc_\ba_\bl_\b-_\bf_\bi_\bl_\be]
390                  Reget acts like get, except that if _\bl_\bo_\bc_\ba_\bl_\b-_\bf_\bi_\bl_\be exists and is
391                  smaller than _\br_\be_\bm_\bo_\bt_\be_\b-_\bf_\bi_\bl_\be, _\bl_\bo_\bc_\ba_\bl_\b-_\bf_\bi_\bl_\be is presumed to be a par-
392                  tially transferred copy of _\br_\be_\bm_\bo_\bt_\be_\b-_\bf_\bi_\bl_\be and the transfer is
393                  continued from the apparent point of failure.  This command
394                  is useful when transferring very large files over networks
395
396                  that are prone to dropping connections.
397
398      r\bre\bem\bmo\bot\bte\beh\bhe\bel\blp\bp [_\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b-_\bn_\ba_\bm_\be]
399                  Request help from the remote FTP server.  If a _\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b-_\bn_\ba_\bm_\be
400                  is specified it is supplied to the server as well.
401
402      r\bre\bem\bmo\bot\bte\bes\bst\bta\bat\btu\bus\bs [_\bf_\bi_\bl_\be_\b-_\bn_\ba_\bm_\be]
403                  With no arguments, show status of remote machine.  If _\bf_\bi_\bl_\be_\b-
404                  _\bn_\ba_\bm_\be is specified, show status of _\bf_\bi_\bl_\be_\b-_\bn_\ba_\bm_\be on remote ma-
405                  chine.
406
407      r\bre\ben\bna\bam\bme\be [_\bf_\br_\bo_\bm] [_\bt_\bo]
408                  Rename the file _\bf_\br_\bo_\bm on the remote machine, to the file _\bt_\bo.
409
410      r\bre\bes\bse\bet\bt       Clear reply queue.  This command re-synchronizes command/re-
411                  ply sequencing with the remote ftp server.  Resynchronization
412                  may be necessary following a violation of the ftp protocol by
413                  the remote server.
414
415      r\bre\bes\bst\bta\bar\brt\bt _\bm_\ba_\br_\bk_\be_\br
416                  Restart the immediately following g\bge\bet\bt or p\bpu\but\bt at the indicated
417                  _\bm_\ba_\br_\bk_\be_\br. On UNIX systems, marker is usually a byte offset into
418                  the file.
419
420      r\brm\bmd\bdi\bir\br _\bd_\bi_\br_\be_\bc_\bt_\bo_\br_\by_\b-_\bn_\ba_\bm_\be
421                  Delete a directory on the remote machine.
422
423      r\bru\bun\bni\biq\bqu\bue\be     Toggle storing of files on the local system with unique file-
424                  names.  If a file already exists with a name equal to the
425                  target local filename for a g\bge\bet\bt or m\bmg\bge\bet\bt command, a ".1" is
426                  appended to the name.  If the resulting name matches another
427                  existing file, a ".2" is appended to the original name.  If
428                  this process continues up to ".99", an error message is
429                  printed, and the transfer does not take place.  The generated
430                  unique filename will be reported.  Note that r\bru\bun\bni\biq\bqu\bue\be will not
431                  affect local files generated from a shell command (see be-
432                  low).  The default value is off.
433
434      s\bse\ben\bnd\bd _\bl_\bo_\bc_\ba_\bl_\b-_\bf_\bi_\bl_\be [_\br_\be_\bm_\bo_\bt_\be_\b-_\bf_\bi_\bl_\be]
435                  A synonym for put.
436
437      s\bse\ben\bnd\bdp\bpo\bor\brt\bt    Toggle the use of PORT commands.  By default, f\bft\btp\bp will at-
438                  tempt to use a PORT command when establishing a connection
439                  for each data transfer.  The use of PORT commands can prevent
440                  delays when performing multiple file transfers.  If the PORT
441                  command fails, f\bft\btp\bp will use the default data port.  When the
442                  use of PORT commands is disabled, no attempt will be made to
443                  use PORT commands for each data transfer.  This is useful for
444                  certain FTP implementations which do ignore PORT commands
445                  but, incorrectly, indicate they've been accepted.
446
447      s\bsi\bit\bte\be _\ba_\br_\bg_\b1 _\ba_\br_\bg_\b2 _\b._\b._\b.
448                  The arguments specified are sent, verbatim, to the remote FTP
449                  server as a SITE command.
450
451      s\bsi\biz\bze\be _\bf_\bi_\bl_\be_\b-_\bn_\ba_\bm_\be
452                  Return size of _\bf_\bi_\bl_\be_\b-_\bn_\ba_\bm_\be on remote machine.
453
454      s\bst\bta\bat\btu\bus\bs      Show the current status of f\bft\btp\bp.
455
456      s\bst\btr\bru\buc\bct\bt [_\bs_\bt_\br_\bu_\bc_\bt_\b-_\bn_\ba_\bm_\be]
457                  Set the file transfer _\bs_\bt_\br_\bu_\bc_\bt_\bu_\br_\be to _\bs_\bt_\br_\bu_\bc_\bt_\b-_\bn_\ba_\bm_\be. By default
458                  ``stream'' structure is used.
459
460      s\bsu\bun\bni\biq\bqu\bue\be     Toggle storing of files on remote machine under unique file
461                  names.  Remote ftp server must support ftp protocol STOU com-
462                  mand for successful completion.  The remote server will re-
463                  port unique name.  Default value is off.
464
465      s\bsy\bys\bst\bte\bem\bm      Show the type of operating system running on the remote ma-
466                  chine.
467
468      t\bte\ben\bne\bex\bx       Set the file transfer type to that needed to talk to TENEX
469                  machines.
470
471      t\btr\bra\bac\bce\be       Toggle packet tracing.
472
473      t\bty\byp\bpe\be [_\bt_\by_\bp_\be_\b-_\bn_\ba_\bm_\be]
474                  Set the file transfer t\bty\byp\bpe\be to _\bt_\by_\bp_\be_\b-_\bn_\ba_\bm_\be. If no type is speci-
475                  fied, the current type is printed.  The default type is net-
476                  work ASCII.
477
478      u\bum\bma\bas\bsk\bk [_\bn_\be_\bw_\bm_\ba_\bs_\bk]
479                  Set the default umask on the remote server to _\bn_\be_\bw_\bm_\ba_\bs_\bk. If
480                  _\bn_\be_\bw_\bm_\ba_\bs_\bk is omitted, the current umask is printed.
481
482      u\bus\bse\ber\br _\bu_\bs_\be_\br_\b-_\bn_\ba_\bm_\be [_\bp_\ba_\bs_\bs_\bw_\bo_\br_\bd] [_\ba_\bc_\bc_\bo_\bu_\bn_\bt]
483                  Identify yourself to the remote FTP server.  If the _\bp_\ba_\bs_\bs_\bw_\bo_\br_\bd
484                  is not specified and the server requires it, f\bft\btp\bp will prompt
485                  the user for it (after disabling local echo).  If an _\ba_\bc_\bc_\bo_\bu_\bn_\bt
486                  field is not specified, and the FTP server requires it, the
487                  user will be prompted for it.  If an _\ba_\bc_\bc_\bo_\bu_\bn_\bt field is speci-
488                  fied, an account command will be relayed to the remote server
489                  after the login sequence is completed if the remote server
490                  did not require it for logging in.  Unless f\bft\btp\bp is invoked
491                  with ``auto-login'' disabled, this process is done automati-
492                  cally on initial connection to the FTP server.
493
494      v\bve\ber\brb\bbo\bos\bse\be     Toggle verbose mode.  In verbose mode, all responses from the
495                  FTP server are displayed to the user.  In addition, if ver-
496                  bose is on, when a file transfer completes, statistics re-
497                  garding the efficiency of the transfer are reported.  By de-
498                  fault, verbose is on.
499
500      ?\b? [_\bc_\bo_\bm_\bm_\ba_\bn_\bd]
501                  A synonym for help.
502
503      The following command can be used with ftpsec-aware servers.
504
505      p\bpr\bro\bot\bt _\bc_\bl_\be_\ba_\br | _\bs_\ba_\bf_\be | _\bc_\bo_\bn_\bf_\bi_\bd_\be_\bn_\bt_\bi_\ba_\bl | _\bp_\br_\bi_\bv_\ba_\bt_\be
506                  Set the data protection level to the requested level.
507
508      The following command can be used with ftp servers that has implemented
509      the KAUTH site command.
510
511      k\bka\bau\but\bth\bh [_\bp_\br_\bi_\bn_\bc_\bi_\bp_\ba_\bl]
512                  Obtain remote tickets.
513
514      Command arguments which have embedded spaces may be quoted with quote `"'
515      marks.
516
517 A\bAB\bBO\bOR\bRT\bTI\bIN\bNG\bG A\bA F\bFI\bIL\bLE\bE T\bTR\bRA\bAN\bNS\bSF\bFE\bER\bR
518      To abort a file transfer, use the terminal interrupt key (usually Ctrl-
519      C).  Sending transfers will be immediately halted.  Receiving transfers
520      will be halted by sending a ftp protocol ABOR command to the remote serv-
521      er, and discarding any further data received.  The speed at which this is
522      accomplished depends upon the remote server's support for ABOR process-
523      ing.  If the remote server does not support the ABOR command, an `ftp>'
524      prompt will not appear until the remote server has completed sending the
525      requested file.
526
527
528      The terminal interrupt key sequence will be ignored when f\bft\btp\bp has complet-
529      ed any local processing and is awaiting a reply from the remote server.
530      A long delay in this mode may result from the ABOR processing described
531      above, or from unexpected behavior by the remote server, including viola-
532      tions of the ftp protocol.  If the delay results from unexpected remote
533      server behavior, the local f\bft\btp\bp program must be killed by hand.
534
535 F\bFI\bIL\bLE\bE N\bNA\bAM\bMI\bIN\bNG\bG C\bCO\bON\bNV\bVE\bEN\bNT\bTI\bIO\bON\bNS\bS
536      Files specified as arguments to f\bft\btp\bp commands are processed according to
537      the following rules.
538
539      1.   If the file name `-\b-' is specified, the _\bs_\bt_\bd_\bi_\bn (for reading) or _\bs_\bt_\bd_\bo_\bu_\bt
540           (for writing) is used.
541
542      2.   If the first character of the file name is `|', the remainder of the
543           argument is interpreted as a shell command.  F\bFt\btp\bp then forks a shell,
544           using popen(3) with the argument supplied, and reads (writes) from
545           the stdout (stdin).  If the shell command includes spaces, the argu-
546           ment must be quoted; e.g.  ``" ls -lt"''.  A particularly useful ex-
547           ample of this mechanism is: ``dir more''.
548
549      3.   Failing the above checks, if ``globbing'' is enabled, local file
550           names are expanded according to the rules used in the csh(1);  c.f.
551           the g\bgl\blo\bob\bb command.  If the f\bft\btp\bp command expects a single local file
552           (.e.g.  p\bpu\but\bt), only the first filename generated by the "globbing"
553           operation is used.
554
555      4.   For m\bmg\bge\bet\bt commands and g\bge\bet\bt commands with unspecified local file
556           names, the local filename is the remote filename, which may be al-
557           tered by a c\bca\bas\bse\be, n\bnt\btr\bra\ban\bns\bs, or n\bnm\bma\bap\bp setting.  The resulting filename
558           may then be altered if r\bru\bun\bni\biq\bqu\bue\be is on.
559
560      5.   For m\bmp\bpu\but\bt commands and p\bpu\but\bt commands with unspecified remote file
561           names, the remote filename is the local filename, which may be al-
562           tered by a n\bnt\btr\bra\ban\bns\bs or n\bnm\bma\bap\bp setting.  The resulting filename may then
563           be altered by the remote server if s\bsu\bun\bni\biq\bqu\bue\be is on.
564
565 F\bFI\bIL\bLE\bE T\bTR\bRA\bAN\bNS\bSF\bFE\bER\bR P\bPA\bAR\bRA\bAM\bME\bET\bTE\bER\bRS\bS
566      The FTP specification specifies many parameters which may affect a file
567      transfer.  The t\bty\byp\bpe\be may be one of ``ascii'', ``image'' (binary),
568      ``ebcdic'', and ``local byte size'' (for PDP-10's and PDP-20's mostly).
569      F\bFt\btp\bp supports the ascii and image types of file transfer, plus local byte
570      size 8 for t\bte\ben\bne\bex\bx mode transfers.
571
572      F\bFt\btp\bp supports only the default values for the remaining file transfer pa-
573      rameters: m\bmo\bod\bde\be, f\bfo\bor\brm\bm, and s\bst\btr\bru\buc\bct\bt.
574
575 T\bTH\bHE\bE .\b.n\bne\bet\btr\brc\bc F\bFI\bIL\bLE\bE
576      The _\b._\bn_\be_\bt_\br_\bc file contains login and initialization information used by the
577      auto-login process.  It resides in the user's home directory.  The fol-
578      lowing tokens are recognized; they may be separated by spaces, tabs, or
579      new-lines:
580
581      m\bma\bac\bch\bhi\bin\bne\be _\bn_\ba_\bm_\be
582                Identify a remote machine _\bn_\ba_\bm_\be. The auto-login process searches
583                the _\b._\bn_\be_\bt_\br_\bc file for a m\bma\bac\bch\bhi\bin\bne\be token that matches the remote ma-
584                chine specified on the f\bft\btp\bp command line or as an o\bop\bpe\ben\bn command
585                argument.  Once a match is made, the subsequent _\b._\bn_\be_\bt_\br_\bc tokens
586                are processed, stopping when the end of file is reached or an-
587                other m\bma\bac\bch\bhi\bin\bne\be or a d\bde\bef\bfa\bau\bul\blt\bt token is encountered.
588
589      d\bde\bef\bfa\bau\bul\blt\bt   This is the same as m\bma\bac\bch\bhi\bin\bne\be _\bn_\ba_\bm_\be except that d\bde\bef\bfa\bau\bul\blt\bt matches
590                any name.  There can be only one d\bde\bef\bfa\bau\bul\blt\bt token, and it must be
591                after all m\bma\bac\bch\bhi\bin\bne\be tokens.  This is normally used as:
592
593
594                      default login anonymous password user@site
595
596                thereby giving the user _\ba_\bu_\bt_\bo_\bm_\ba_\bt_\bi_\bc anonymous ftp login to ma-
597                chines not specified in _\b._\bn_\be_\bt_\br_\bc. This can be overridden by using
598                the -\b-n\bn flag to disable auto-login.
599
600      l\blo\bog\bgi\bin\bn _\bn_\ba_\bm_\be
601                Identify a user on the remote machine.  If this token is pre-
602                sent, the auto-login process will initiate a login using the
603                specified _\bn_\ba_\bm_\be.
604
605      p\bpa\bas\bss\bsw\bwo\bor\brd\bd _\bs_\bt_\br_\bi_\bn_\bg
606                Supply a password.  If this token is present, the auto-login
607                process will supply the specified string if the remote server
608                requires a password as part of the login process.  Note that if
609                this token is present in the _\b._\bn_\be_\bt_\br_\bc file for any user other
610                than _\ba_\bn_\bo_\bn_\by_\bm_\bo_\bu_\bs, f\bft\btp\bp will abort the auto-login process if the
611                _\b._\bn_\be_\bt_\br_\bc is readable by anyone besides the user.
612
613      a\bac\bcc\bco\bou\bun\bnt\bt _\bs_\bt_\br_\bi_\bn_\bg
614                Supply an additional account password.  If this token is pre-
615                sent, the auto-login process will supply the specified string
616                if the remote server requires an additional account password,
617                or the auto-login process will initiate an ACCT command if it
618                does not.
619
620      m\bma\bac\bcd\bde\bef\bf _\bn_\ba_\bm_\be
621                Define a macro.  This token functions like the f\bft\btp\bp m\bma\bac\bcd\bde\bef\bf com-
622                mand functions.  A macro is defined with the specified name;
623                its contents begin with the next _\b._\bn_\be_\bt_\br_\bc line and continue until
624                a null line (consecutive new-line characters) is encountered.
625                If a macro named i\bin\bni\bit\bt is defined, it is automatically executed
626                as the last step in the auto-login process.
627
628 E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT
629      F\bFt\btp\bp uses the following environment variables.
630
631      HOME        For default location of a _\b._\bn_\be_\bt_\br_\bc file, if one exists.
632
633      SHELL       For default shell.
634
635 S\bSE\bEE\bE A\bAL\bLS\bSO\bO
636      ftpd(8)
637
638      _\bR_\bF_\bC_\b2_\b2_\b2_\b8.
639
640 H\bHI\bIS\bST\bTO\bOR\bRY\bY
641      The f\bft\btp\bp command appeared in 4.2BSD.
642
643 B\bBU\bUG\bGS\bS
644      Correct execution of many commands depends upon proper behavior by the
645      remote server.
646
647      An error in the treatment of carriage returns in the 4.2BSD ascii-mode
648      transfer code has been corrected.  This correction may result in incor-
649      rect transfers of binary files to and from 4.2BSD servers using the ascii
650      type.  Avoid this problem by using the binary image type.
651
652 4.2 Berkeley Distribution       April 27, 1996                              10