Print this page
5069 Removal of wu-ftpd
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Milan Jurik <milan.jurik@xylab.cz>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: Gary Mills <gary_mills@fastmail.fm>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Adam Stevko <adam.stevko@gmail.com>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man1/ftp.1
+++ new/usr/src/man/man1/ftp.1
1 1 '\" te
2 2 .\" Copyright 1989 AT&T
3 3 .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
4 4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6 6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 7 .TH FTP 1 "Jun 6, 2006"
↓ open down ↓ |
7 lines elided |
↑ open up ↑ |
8 8 .SH NAME
9 9 ftp \- file transfer program
10 10 .SH SYNOPSIS
11 11 .LP
12 12 .nf
13 13 \fBftp\fR [\fB-adfginpstvx\fR] [\fB-m\fR \fIGSS Mech\fR] [\fB-T\fR \fItimeout\fR]
14 14 [\fIhostname\fR [\fIport\fR]]
15 15 .fi
16 16
17 17 .SH DESCRIPTION
18 -.sp
19 18 .LP
20 19 The \fBftp\fR command is the user interface to the \fBInternet\fR standard File
21 20 Transfer Protocol (\fBFTP\fR). \fBftp\fR transfers files to and from a remote
22 21 network site.
23 22 .sp
24 23 .LP
25 24 The host and optional port with which \fBftp\fR is to communicate can be
26 25 specified on the command line. If this is done, \fBftp\fR immediately attempts
27 26 to establish a connection to an \fBFTP\fR server on that host. Otherwise,
28 27 \fBftp\fR enters its command interpreter and awaits instructions from the user.
29 28 When \fBftp\fR is awaiting commands from the user, it displays the prompt
30 29 \fBftp>\fR.
31 30 .SH OPTIONS
32 -.sp
33 31 .LP
34 32 The following options can be specified at the command line, or to the command
35 33 interpreter:
36 34 .sp
37 35 .ne 2
38 36 .na
39 37 \fB\fB-a\fR\fR
40 38 .ad
41 39 .RS 14n
42 40 Uses \fBGSSAPI\fR authentication \fBonly\fR. If the authentication fails, this
43 41 option closes the connection.
44 42 .RE
45 43
46 44 .sp
47 45 .ne 2
48 46 .na
49 47 \fB\fB-d\fR\fR
50 48 .ad
51 49 .RS 14n
52 50 Enables debugging.
53 51 .RE
54 52
55 53 .sp
56 54 .ne 2
57 55 .na
58 56 \fB\fB-f\fR\fR
59 57 .ad
60 58 .RS 14n
61 59 Forwards local security credentials to the remote server.
62 60 .RE
63 61
64 62 .sp
65 63 .ne 2
66 64 .na
67 65 \fB\fB-g\fR\fR
68 66 .ad
69 67 .RS 14n
70 68 Disables filename "globbing".
71 69 .RE
72 70
73 71 .sp
74 72 .ne 2
75 73 .na
76 74 \fB\fB-i\fR\fR
77 75 .ad
78 76 .RS 14n
79 77 Turns off interactive prompting during multiple file transfers.
80 78 .RE
81 79
82 80 .sp
83 81 .ne 2
84 82 .na
85 83 \fB\fB-m\fR\fR
86 84 .ad
87 85 .RS 14n
88 86 Specifies the \fBGSS\fR-\fBAPI\fR mechanism to use. The default is to use the
89 87 kerberos_v5 mechanism. Supported alternatives are defined in
90 88 \fB/etc/gss/mech\fR (see \fBmech\fR(4)).
91 89 .RE
92 90
93 91 .sp
94 92 .ne 2
95 93 .na
96 94 \fB\fB-n\fR\fR
97 95 .ad
98 96 .RS 14n
99 97 Does not attempt "auto-login" upon initial connection. If auto-login is not
100 98 disabled, \fBftp\fR checks the \fB\&.netrc\fR file in the user's home directory
101 99 for an entry describing an account on the remote machine. If no entry exists,
102 100 \fBftp\fR prompts for the login name of the account on the remote machine (the
103 101 default is the login name on the local machine), and, if necessary, prompts for
104 102 a password and an account with which to login.
105 103 .RE
106 104
107 105 .sp
108 106 .ne 2
109 107 .na
110 108 \fB\fB-p\fR\fR
111 109 .ad
112 110 .RS 14n
113 111 Enables passive mode for data transfers. This command is useful when connecting
114 112 to a remote host from behind a connection filtering firewall.
115 113 .RE
116 114
117 115 .sp
118 116 .ne 2
119 117 .na
120 118 \fB\fB-s\fR\fR
121 119 .ad
122 120 .RS 14n
123 121 Skips the \fBSYST\fR command that is sent by default to all remote servers upon
124 122 connection. The system command is what enables the automatic use of binary mode
125 123 rather than the protocol default ascii mode.
126 124 .sp
127 125 As some older servers cannot handle the \fBftp\fR command, this directive is
128 126 provided to allow inter-operability with these servers.
129 127 .RE
130 128
131 129 .sp
132 130 .ne 2
133 131 .na
134 132 \fB\fB-t\fR\fR
135 133 .ad
136 134 .RS 14n
137 135 Enables packet tracing (unimplemented).
138 136 .RE
139 137
140 138 .sp
141 139 .ne 2
142 140 .na
143 141 \fB\fB-T\fR \fItimeout\fR\fR
144 142 .ad
145 143 .RS 14n
146 144 Enables global connection timer, specified in seconds (decimal). There is a
147 145 timer for the control connection that is reset when anything is sent to the
148 146 server and disabled while the client is prompting for user input. Another
149 147 independent timer is used to monitor incoming or outgoing data connections.
150 148 .RE
151 149
152 150 .sp
153 151 .ne 2
154 152 .na
155 153 \fB\fB-v\fR\fR
156 154 .ad
157 155 .RS 14n
158 156 Shows all responses from the remote server, as well as report on data transfer
159 157 statistics. This is turned on by default if \fBftp\fR is running interactively
160 158 with its input coming from the user's terminal.
161 159 .RE
162 160
163 161 .sp
164 162 .ne 2
165 163 .na
166 164 \fB\fB-x\fR\fR
167 165 .ad
168 166 .RS 14n
169 167 Attempts to use \fBGSSAPI\fR for authentication and encryption. Data and
170 168 Command channel protection is set to "\fBprivate\fR".
171 169 .RE
172 170
173 171 .sp
174 172 .LP
175 173 The following commands can be specified to the command interpreter:
176 174 .sp
177 175 .ne 2
178 176 .na
179 177 \fB\fB!\fR\fR
180 178 .ad
181 179 .sp .6
182 180 .RS 4n
183 181 [ \fIcommand\fR ] Runs \fIcommand\fR as a shell command on the local machine.
184 182 If no \fIcommand\fR is given, invokes an interactive shell.
185 183 .RE
186 184
187 185 .sp
188 186 .ne 2
189 187 .na
190 188 \fB\fB$\fR \fImacro-name\fR [ \fIargs\fR ]\fR
191 189 .ad
192 190 .sp .6
193 191 .RS 4n
194 192 Executes the macro \fImacro-name\fR that was defined with the \fBmacdef\fR
195 193 command. Arguments are passed to the macro unglobbed.
196 194 .RE
197 195
198 196 .sp
199 197 .ne 2
200 198 .na
201 199 \fB\fBaccount\fR [ \fIpasswd\fR ]\fR
202 200 .ad
203 201 .sp .6
204 202 .RS 4n
205 203 Supplies a supplemental password required by a remote system for access to
206 204 resources once a login has been successfully completed. If no argument is
207 205 included, the user is prompted for an account password in a non-echoing input
208 206 mode.
209 207 .RE
210 208
211 209 .sp
212 210 .ne 2
213 211 .na
214 212 \fB\fBappend\fR \fIlocal-file\fR [ \fIremote-file\fR ]\fR
215 213 .ad
216 214 .sp .6
217 215 .RS 4n
218 216 Appends a local file to a file on the remote machine. If \fIremote-file\fR is
219 217 not specified, the local file name is used, subject to alteration by any
220 218 \fBntrans\fR or \fBnmap\fR settings. File transfer uses the current settings
221 219 for "representation type", "file structure", and "transfer mode".
222 220 .RE
223 221
224 222 .sp
225 223 .ne 2
226 224 .na
227 225 \fB\fBascii\fR\fR
228 226 .ad
229 227 .sp .6
230 228 .RS 4n
231 229 Sets the "representation type" to "network \fBASCII\fR". This is the default
232 230 type.
233 231 .RE
234 232
235 233 .sp
236 234 .ne 2
237 235 .na
238 236 \fB\fBbell\fR\fR
239 237 .ad
240 238 .sp .6
241 239 .RS 4n
242 240 Sounds a bell after each file transfer command is completed.
243 241 .RE
244 242
245 243 .sp
246 244 .ne 2
247 245 .na
248 246 \fB\fBbinary\fR\fR
249 247 .ad
250 248 .sp .6
251 249 .RS 4n
252 250 Sets the "representation type" to "image".
253 251 .RE
254 252
255 253 .sp
256 254 .ne 2
257 255 .na
258 256 \fB\fBbye\fR\fR
259 257 .ad
260 258 .sp .6
261 259 .RS 4n
262 260 Terminates the \fBFTP\fR session with the remote server and exit \fBftp\fR. An
263 261 \fBEOF\fR also terminates the session and exit.
264 262 .RE
265 263
266 264 .sp
267 265 .ne 2
268 266 .na
269 267 \fB\fBcase\fR\fR
270 268 .ad
271 269 .sp .6
272 270 .RS 4n
273 271 Toggles remote computer file name case mapping during \fBmget\fR commands. When
274 272 \fBcase\fR is on (default is off), remote computer file names with all letters
275 273 in upper case are written in the local directory with the letters mapped to
276 274 lower case.
277 275 .RE
278 276
279 277 .sp
280 278 .ne 2
281 279 .na
282 280 \fB\fBcd\fR \fIremote-directory\fR\fR
283 281 .ad
284 282 .sp .6
285 283 .RS 4n
286 284 Changes the working directory on the remote machine to \fIremote-directory\fR.
287 285 .RE
288 286
289 287 .sp
290 288 .ne 2
291 289 .na
292 290 \fB\fBcdup\fR\fR
293 291 .ad
294 292 .sp .6
295 293 .RS 4n
296 294 Changes the remote machine working directory to the parent of the current
297 295 remote machine working directory.
298 296 .RE
299 297
300 298 .sp
301 299 .ne 2
302 300 .na
303 301 \fB\fBclear\fR\fR
304 302 .ad
305 303 .sp .6
306 304 .RS 4n
307 305 Sets the protection level on data transfers to "\fBclear\fR". If no \fBADAT\fR
308 306 command succeeded, then this is the default protection level.
309 307 .RE
310 308
311 309 .sp
312 310 .ne 2
313 311 .na
314 312 \fB\fBclose\fR\fR
315 313 .ad
316 314 .sp .6
317 315 .RS 4n
318 316 Terminates the \fBFTP\fR session with the remote server, and return to the
319 317 command interpreter. Any defined macros are erased.
320 318 .RE
321 319
322 320 .sp
323 321 .ne 2
324 322 .na
325 323 \fB\fBcr\fR\fR
326 324 .ad
327 325 .sp .6
328 326 .RS 4n
329 327 Toggles RETURN stripping during "network \fBASCII\fR" type file retrieval.
330 328 Records are denoted by a RETURN/\fBLINEFEED\fR sequence during "network
331 329 \fBASCII\fR" type file transfer. When \fBcr\fR is on (the default), RETURN
332 330 characters are stripped from this sequence to conform with the UNIX system
333 331 single \fBLINEFEED\fR record delimiter. Records on non-UNIX-system remote hosts
334 332 can contain single \fBLINEFEED\fR characters; when an "network \fBASCII\fR"
335 333 type transfer is made, these \fBLINEFEED\fR characters can be distinguished
336 334 from a record delimiter only when \fBcr\fR is off.
337 335 .RE
338 336
339 337 .sp
340 338 .ne 2
341 339 .na
342 340 \fB\fBdelete\fR \fIremote-file\fR\fR
343 341 .ad
344 342 .sp .6
345 343 .RS 4n
346 344 Deletes the file \fIremote-file\fR on the remote machine.
347 345 .RE
348 346
349 347 .sp
350 348 .ne 2
351 349 .na
352 350 \fB\fBdebug\fR\fR
353 351 .ad
354 352 .sp .6
355 353 .RS 4n
356 354 Toggles debugging mode. When debugging is on, \fBftp\fR prints each command
357 355 sent to the remote machine, preceded by the string \fB->\fR\&.
358 356 .RE
359 357
360 358 .sp
361 359 .ne 2
362 360 .na
363 361 \fB\fBdir\fR [ \fIremote-directory\fR [ \fIlocal-file\fR ]]\fR
364 362 .ad
365 363 .sp .6
366 364 .RS 4n
367 365 Prints a listing of the directory contents in the directory,
368 366 \fIremote-directory\fR, and, optionally, placing the output in
369 367 \fIlocal-file\fR. If no directory is specified, the current working directory
370 368 on the remote machine is used. If no local file is specified, or
371 369 \fIlocal-file\fR is \fB\(mi\fR, output is sent to the terminal.
372 370 .RE
373 371
374 372 .sp
375 373 .ne 2
376 374 .na
377 375 \fB\fBdisconnect\fR\fR
378 376 .ad
379 377 .sp .6
380 378 .RS 4n
381 379 A synonym for \fBclose\fR.
382 380 .RE
383 381
384 382 .sp
385 383 .ne 2
386 384 .na
387 385 \fB\fBform\fR [ \fIformat-name\fR ]\fR
388 386 .ad
389 387 .sp .6
390 388 .RS 4n
391 389 Sets the carriage control format subtype of the "representation type" to
392 390 \fIformat-name\fR. The only valid \fIformat-name\fR is \fBnon-print\fR, which
393 391 corresponds to the default "non-print" subtype.
394 392 .RE
395 393
396 394 .sp
397 395 .ne 2
398 396 .na
399 397 \fB\fBget\fR \fIremote-file\fR [ \fIlocal-file\fR ]\fR
400 398 .ad
401 399 .sp .6
402 400 .RS 4n
403 401 Retrieves the \fIremote-file\fR and store it on the local machine. If the local
404 402 file name is not specified, it is given the same name it has on the remote
405 403 machine, subject to alteration by the current \fBcase\fR, \fBntrans\fR, and
406 404 \fBnmap\fR settings. The current settings for "representation type", "file
407 405 structure", and "transfer mode" are used while transferring the file.
408 406 .RE
409 407
410 408 .sp
411 409 .ne 2
412 410 .na
413 411 \fB\fBglob\fR\fR
414 412 .ad
415 413 .sp .6
416 414 .RS 4n
417 415 Toggles filename expansion, or "globbing", for \fBmdelete\fR, \fBmget\fR and
418 416 \fBmput\fR. If globbing is turned off, filenames are taken literally.
419 417 .sp
420 418 Globbing for \fBmput\fR is done as in \fBsh\fR(1). For \fBmdelete\fR and
421 419 \fBmget\fR, each remote file name is expanded separately on the remote machine,
422 420 and the lists are not merged.
423 421 .sp
424 422 Expansion of a directory name is likely to be radically different from
425 423 expansion of the name of an ordinary file: the exact result depends on the
426 424 remote operating system and \fBFTP\fR server, and can be previewed with the
427 425 command, \fBmls\fR \fIremote-files\fR \(mi.
428 426 .sp
429 427 \fBmget\fR and \fBmput\fR are not meant to transfer entire directory subtrees
430 428 of files. You can do this by transferring a \fBtar\fR(1) archive of the subtree
431 429 (using a "representation type" of "image" as set by the \fBbinary\fR command).
432 430 .RE
433 431
434 432 .sp
435 433 .ne 2
436 434 .na
437 435 \fB\fBhash\fR\fR
438 436 .ad
439 437 .sp .6
440 438 .RS 4n
441 439 Toggles hash-sign (\fB#\fR) printing for each data block transferred. The size
442 440 of a data block is 8192 bytes.
443 441 .RE
444 442
445 443 .sp
446 444 .ne 2
447 445 .na
448 446 \fB\fBhelp\fR [ \fIcommand\fR ]\fR
449 447 .ad
450 448 .sp .6
451 449 .RS 4n
452 450 Prints an informative message about the meaning of \fIcommand\fR. If no
453 451 argument is given, \fBftp\fR prints a list of the known commands.
454 452 .RE
455 453
456 454 .sp
457 455 .ne 2
458 456 .na
459 457 \fB\fBlcd\fR [ \fIdirectory\fR ]\fR
460 458 .ad
461 459 .sp .6
462 460 .RS 4n
463 461 Changes the working directory on the local machine. If no \fIdirectory\fR is
464 462 specified, the user's home directory is used.
465 463 .RE
466 464
467 465 .sp
468 466 .ne 2
469 467 .na
470 468 \fB\fBls\fR [ \fB-al\fR | \fIremote-directory\fR [ \fIlocal-file\fR ]]\fR
471 469 .ad
472 470 .sp .6
473 471 .RS 4n
474 472 By default, prints an abbreviated listing of the contents of a directory on the
475 473 remote machine. This default behavior can be changed to make \fBls\fR a synonym
476 474 of the \fBdir\fR command. This change can be achieved by setting
477 475 \fBFTP_LS_SENDS_NLST\fR to '\fBno\fR' in \fB/etc/default/ftp\fR or in the
478 476 environment. See \fBftp\fR(4) for details.
479 477 .sp
480 478 The \fB-a\fR option lists all entries, including those that begin with a dot
481 479 (\fB\&.\fR), which are normally not listed. The \fB-l\fR option lists files in
482 480 long format, giving mode, number of links, owner, group, size in bytes, and
483 481 time of last modification for each file. If the file is a special file, the
484 482 size field instead contains the major and minor device numbers rather than a
485 483 size. If the file is a symbolic link, the filename is printed followed by
486 484 "\fB\(->\fR" and the pathname of the referenced file.
487 485 .sp
488 486 If \fIremote-directory\fR is left unspecified, the current working directory is
489 487 used.
490 488 .sp
491 489 If no local file is specified, or if \fIlocal-file\fR is \fB\(mi\fR, the output
492 490 is sent to the terminal.
493 491 .RE
494 492
495 493 .sp
496 494 .ne 2
497 495 .na
498 496 \fB\fBmacdef\fR \fImacro-name\fR\fR
499 497 .ad
500 498 .sp .6
501 499 .RS 4n
502 500 Defines a macro. Subsequent lines are stored as the macro \fImacro-name\fR. A
503 501 null line (consecutive \fBNEWLINE\fR characters in a file or RETURN characters
504 502 from the terminal) terminates macro input mode. There is a limit of 16 macros
505 503 and 4096 total characters in all defined macros. Macros remain defined until a
506 504 \fBclose\fR command is executed.
507 505 .sp
508 506 The macro processor interprets \fB$\fR and \fB\e\fR as special characters. A
509 507 \fB$\fR followed by a number (or numbers) is replaced by the corresponding
510 508 argument on the macro invocation command line. A \fB$\fR followed by an \fBi\fR
511 509 signals that macro processor that the executing macro is to be looped. On the
512 510 first pass, \fB$i\fR is replaced by the first argument on the macro invocation
513 511 command line; on the second pass, it is replaced by the second argument, and so
514 512 on. A \fB\e\fR followed by any character is replaced by that character. Use the
515 513 \fB\e\fR to prevent special treatment of the \fB$\fR.
516 514 .RE
517 515
518 516 .sp
519 517 .ne 2
520 518 .na
521 519 \fB\fBmdelete\fR \fIremote-files\fR\fR
522 520 .ad
523 521 .sp .6
524 522 .RS 4n
525 523 Deletes the \fIremote-files\fR on the remote machine.
526 524 .RE
527 525
528 526 .sp
529 527 .ne 2
530 528 .na
531 529 \fB\fBmdir\fR \fIremote-files local-file\fR\fR
532 530 .ad
533 531 .sp .6
534 532 .RS 4n
535 533 Like \fBdir\fR, except multiple remote files can be specified. If interactive
536 534 prompting is on, \fBftp\fR prompts the user to verify that the last argument is
537 535 indeed the target local file for receiving \fBmdir\fR output.
538 536 .RE
539 537
540 538 .sp
541 539 .ne 2
542 540 .na
543 541 \fB\fBmget\fR \fIremote-files\fR\fR
544 542 .ad
545 543 .sp .6
546 544 .RS 4n
547 545 Expands the \fIremote-files\fR on the remote machine and do a \fBget\fR for
548 546 each file name thus produced. See \fBglob\fR for details on the filename
549 547 expansion. Resulting file names are processed according to \fBcase\fR,
550 548 \fBntrans\fR, and \fBnmap\fR settings. Files are transferred into the local
551 549 working directory, which can be changed with \fBlcd\fR \fIdirectory\fR. New
552 550 local directories can be created with \fB! mkdir\fR \fIdirectory\fR.
553 551 .RE
554 552
555 553 .sp
556 554 .ne 2
557 555 .na
558 556 \fB\fBmkdir\fR \fIdirectory-name\fR\fR
559 557 .ad
560 558 .sp .6
561 559 .RS 4n
562 560 Makes a directory on the remote machine.
563 561 .RE
564 562
565 563 .sp
566 564 .ne 2
567 565 .na
568 566 \fB\fBmls\fR \fIremote-files local-file\fR\fR
569 567 .ad
570 568 .sp .6
571 569 .RS 4n
572 570 Like \fBls\fR(1), except multiple remote files can be specified. If interactive
573 571 prompting is on, \fBftp\fR prompts the user to verify that the last argument is
574 572 indeed the target local file for receiving \fBmls\fR output.
575 573 .RE
576 574
577 575 .sp
578 576 .ne 2
579 577 .na
580 578 \fB\fBmode\fR [ \fImode-name\fR ]\fR
581 579 .ad
582 580 .sp .6
583 581 .RS 4n
584 582 Sets the "transfer mode" to \fImode-name\fR. The only valid \fImode-name\fR is
585 583 \fBstream\fR, which corresponds to the default "stream" mode. This
586 584 implementation only supports \fBstream\fR, and requires that it be specified.
587 585 .RE
588 586
589 587 .sp
590 588 .ne 2
591 589 .na
592 590 \fB\fBmput\fR \fIlocal-files\fR\fR
593 591 .ad
594 592 .sp .6
595 593 .RS 4n
596 594 Expands wild cards in the list of local files given as arguments and do a
597 595 \fBput\fR for each file in the resulting list. See \fBglob\fR for details of
598 596 filename expansion. Resulting file names are processed according to
599 597 \fBntrans\fR and \fBnmap\fR settings.
600 598 .RE
601 599
602 600 .sp
603 601 .ne 2
604 602 .na
605 603 \fB\fBnlist\fR [ \fB-al\fR | \fIremote-directory\fR [ \fIlocal-file\fR ]]\fR
606 604 .ad
607 605 .sp .6
608 606 .RS 4n
609 607 Prints an abbreviated listing of the contents of a directory on the remote
610 608 machine, listing only those files that can be retrieved by the \fBget\fR
611 609 command, unless the \fB-a\fR or \fB-l\fR option is used. If
612 610 \fIremote-directory\fR is left unspecified, the current working directory is
613 611 used.
614 612 .sp
615 613 The \fB-a\fR option lists all entries, including those that begin with a dot
616 614 (\fB\&.\fR), which are normally not listed. The \fB-l\fR option lists files in
617 615 long format the same way it does when used with the \fBls\fR command.
618 616 .RE
619 617
620 618 .sp
621 619 .ne 2
622 620 .na
623 621 \fB\fBnmap\fR [ \fIinpattern outpattern\fR ]\fR
624 622 .ad
625 623 .sp .6
626 624 .RS 4n
627 625 Sets or unsets the filename mapping mechanism. If no arguments are specified,
628 626 the filename mapping mechanism is unset. If arguments are specified, remote
629 627 filenames are mapped during \fBmput\fR commands and \fBput\fR commands issued
630 628 without a specified remote target filename. If arguments are specified, local
631 629 filenames are mapped during \fBmget\fR commands and \fBget\fR commands issued
632 630 without a specified local target filename.
633 631 .sp
634 632 This command is useful when connecting to a non-UNIX-system remote host with
635 633 different file naming conventions or practices. The mapping follows the pattern
636 634 set by \fIinpattern\fR and \fIoutpattern\fR. \fIinpattern\fR is a template for
637 635 incoming filenames (which can have already been processed according to the
638 636 \fBntrans\fR and \fBcase\fR settings). Variable templating is accomplished by
639 637 including the sequences \fB$1\fR, \fB$2\fR, .\|.\|.\|, \fB$9\fR in
640 638 \fIinpattern\fR. Use \fB\e\fR to prevent this special treatment of the \fB$\fR
641 639 character. All other characters are treated literally, and are used to
642 640 determine the \fBnmap\fR \fIinpattern\fR variable values.
643 641 .sp
644 642 For example, given \fIinpattern\fR \fB$1.$2\fR and the remote file name
645 643 \fBmydata.data\fR, \fB$1\fR would have the value \fBmydata\fR, and \fB$2\fR
646 644 would have the value \fBdata\fR.
647 645 .sp
648 646 The \fIoutpattern\fR determines the resulting mapped filename. The sequences
649 647 \fB$1\fR, \fB$2\fR, .\|.\|.\|, \fB$9\fR are replaced by any value resulting
650 648 from the \fIinpattern\fR template. The sequence \fB$0\fR is replaced by the
651 649 original filename. Additionally, the sequence [\fI\|seq1\|\fR,\fI\|seq2\|\fR]
652 650 is replaced by \fIseq1\fR if \fIseq1\fR is not a null string; otherwise it is
653 651 replaced by \fIseq2\fR.
654 652 .sp
655 653 For example, the command \fBnmap $1.$2.$3 [$1,$2].[$2,file]\fR would yield the
656 654 output filename \fBmyfile.data\fR for input filenames \fBmyfile.data\fR and
657 655 \fBmyfile.data.old\fR, \fBmyfile.file\fR for the input filename \fBmyfile\fR,
658 656 and \fBmyfile.myfile\fR for the input filename \fB\&.myfile\fR. \fBSPACE\fR
659 657 characters can be included in \fIoutpattern\fR, as in the example \fBnmap $1 |
660 658 sed "s/ *$//" > $1\fR. Use the \fB\e\fR character to prevent special treatment
661 659 of the \fB$\fR, \fB[\fR, \fB]\fR, and \fB,\fR, characters.
662 660 .RE
663 661
664 662 .sp
665 663 .ne 2
666 664 .na
667 665 \fB\fBntrans\fR [ \fIinchars\fR [ \fIoutchars\fR ] ]\fR
668 666 .ad
669 667 .sp .6
670 668 .RS 4n
671 669 Sets or unsets the filename character translation mechanism. If no arguments
672 670 are specified, the filename character translation mechanism is unset. If
673 671 arguments are specified, characters in remote filenames are translated during
674 672 \fBmput\fR commands and \fBput\fR commands issued without a specified remote
675 673 target filename, and characters in local filenames are translated during
676 674 \fBmget\fR commands and \fBget\fR commands issued without a specified local
677 675 target filename.
678 676 .sp
679 677 This command is useful when connecting to a non-UNIX-system remote host with
680 678 different file naming conventions or practices. Characters in a filename
681 679 matching a character in \fIinchars\fR are replaced with the corresponding
682 680 character in \fIoutchars\fR. If the character's position in \fIinchars\fR is
683 681 longer than the length of \fIoutchars\fR, the character is deleted from the
684 682 file name.
685 683 .sp
686 684 Only 16 characters can be translated when using the \fBntrans\fR command under
687 685 \fBftp\fR. Use \fBcase\fR (described above) if needing to convert the entire
688 686 alphabet.
689 687 .RE
690 688
691 689 .sp
692 690 .ne 2
693 691 .na
694 692 \fB\fBopen\fR \fIhost\fR [ \fIport\fR ]\fR
695 693 .ad
696 694 .sp .6
697 695 .RS 4n
698 696 Establishes a connection to the specified \fIhost\fR \fBFTP\fR server. An
699 697 optional port number can be supplied, in which case, \fBftp\fR attempts to
700 698 contact an \fBFTP\fR server at that port. If the \fIauto-login\fR option is on
701 699 (default setting), \fBftp\fR also attempts to automatically log the user in to
702 700 the \fBFTP\fR server.
703 701 .RE
704 702
705 703 .sp
706 704 .ne 2
707 705 .na
708 706 \fB\fBpassive\fR\fR
709 707 .ad
710 708 .sp .6
711 709 .RS 4n
712 710 Toggles passive mode. When passive mode is turned on, the ftp client sends the
713 711 \fBPASV\fR command requesting that the \fBFTP\fR server open a port for the
714 712 data connection and return the address of that port. The remote server listens
715 713 on that port and the client connects to it. When passive mode is turned off,
716 714 the ftp client sends the \fBPORT\fR command to the server specifying an address
717 715 for the remote server to connect back to. Passive mode is useful when the
718 716 connections to the ftp client are controlled, for example, when behind a
719 717 firewall. When connecting to an IPv6-enabled \fBFTP\fR server, \fBEPSV\fR can
720 718 be used in place of \fBPASV\fR and \fBEPRT\fR in place of \fBPORT\fR.
721 719 .RE
722 720
723 721 .sp
724 722 .ne 2
725 723 .na
726 724 \fB\fBprivate\fR\fR
727 725 .ad
728 726 .sp .6
729 727 .RS 4n
730 728 Sets the protection level on data transfers to "\fBprivate\fR". Data
731 729 transmissions are confidentiality\(em and integrity\(emprotected by encryption.
732 730 If no \fBADAT\fR command succeeded, then the only possible level is "clear".
733 731 .RE
734 732
735 733 .sp
736 734 .ne 2
737 735 .na
738 736 \fB\fBprompt\fR\fR
739 737 .ad
740 738 .sp .6
741 739 .RS 4n
742 740 Toggles interactive prompting. Interactive prompting occurs during multiple
743 741 file transfers to allow the user to selectively retrieve or store files. By
744 742 default, prompting is turned on. If prompting is turned off, any \fBmget\fR or
745 743 \fBmput\fR transfers all files, and any \fBmdelete\fR deletes all files.
746 744 .RE
747 745
748 746 .sp
749 747 .ne 2
750 748 .na
751 749 \fB\fBprotect\fR \fIprotection-level\fR\fR
752 750 .ad
753 751 .sp .6
754 752 .RS 4n
755 753 Sets the protection level on data transfers to \fIprotection-level\fR. The
756 754 valid protection levels are "\fBclear\fR" for unprotected data transmissions,
757 755 "\fBsafe\fR" for data transmissions that are integrity-protected by
758 756 cryptographic checksum, and "\fBprivate\fR" for data transmissions that are
759 757 confidentiality\(em and integrity\(em protected by encryption. If no \fBADAT\fR
760 758 command succeeded, then the only possible level is "\fBclear\fR". If no level
761 759 is specified, the current level is printed. The default protection level is
762 760 "\fBclear\fR".
763 761 .RE
764 762
765 763 .sp
766 764 .ne 2
767 765 .na
768 766 \fB\fBproxy\fR \fIftp-command\fR\fR
769 767 .ad
770 768 .sp .6
771 769 .RS 4n
772 770 Executes an \fBFTP\fR command on a secondary control connection. This command
773 771 allows simultaneous connection to two remote \fBFTP\fR servers for transferring
774 772 files between the two servers. The first \fBproxy\fR command should be an
775 773 \fBopen\fR, to establish the secondary control connection. Enter the command
776 774 \fBproxy\fR \fB?\fR to see other \fBFTP\fR commands executable on the secondary
777 775 connection.
778 776 .sp
779 777 The following commands behave differently when prefaced by \fBproxy\fR:
780 778 \fBopen\fR does not define new macros during the auto-login process,
781 779 \fBclose\fR does not erase existing macro definitions, \fBget\fR and \fBmget\fR
782 780 transfer files from the host on the primary control connection to the host on
783 781 the secondary control connection, and \fBput\fR, \fBmputd\fR, and \fBappend\fR
784 782 transfer files from the host on the secondary control connection to the host on
785 783 the primary control connection.
786 784 .sp
787 785 Third party file transfers depend upon support of the \fBPASV\fR command by the
788 786 server on the secondary control connection.
789 787 .RE
790 788
791 789 .sp
792 790 .ne 2
793 791 .na
794 792 \fB\fBput\fR \fIlocal-file\fR [ \fIremote-file\fR ]\fR
795 793 .ad
796 794 .sp .6
797 795 .RS 4n
798 796 Stores a local file on the remote machine. If \fIremote-file\fR is left
799 797 unspecified, the local file name is used after processing according to any
800 798 \fBntrans\fR or \fBnmap\fR settings in naming the remote file. File transfer
801 799 uses the current settings for "representation type", "file structure", and
802 800 "transfer mode".
803 801 .RE
804 802
805 803 .sp
806 804 .ne 2
807 805 .na
808 806 \fB\fBpwd\fR\fR
809 807 .ad
810 808 .sp .6
811 809 .RS 4n
812 810 Prints the name of the current working directory on the remote machine.
813 811 .RE
814 812
815 813 .sp
816 814 .ne 2
817 815 .na
818 816 \fB\fBquit\fR\fR
819 817 .ad
820 818 .sp .6
821 819 .RS 4n
822 820 A synonym for \fBbye\fR.
823 821 .RE
824 822
825 823 .sp
826 824 .ne 2
827 825 .na
828 826 \fB\fBquote\fR \fIarg1 arg2\fR ...\fR
829 827 .ad
830 828 .sp .6
831 829 .RS 4n
832 830 Sends the arguments specified, verbatim, to the remote \fBFTP\fR server. A
833 831 single \fBFTP\fR reply code is expected in return. (The \fBremotehelp\fR
834 832 command displays a list of valid arguments.)
835 833 .sp
836 834 \fBquote\fR should be used only by experienced users who are familiar with the
837 835 FTP protocol.
838 836 .RE
839 837
840 838 .sp
841 839 .ne 2
842 840 .na
843 841 \fB\fBrecv\fR \fIremote-file\fR [ \fIlocal-file\fR ]\fR
844 842 .ad
845 843 .sp .6
846 844 .RS 4n
847 845 A synonym for \fBget\fR.
848 846 .RE
849 847
850 848 .sp
851 849 .ne 2
852 850 .na
853 851 \fB\fBreget\fR \fIremote-file\fR [ \fIlocal-file\fR ]\fR
854 852 .ad
855 853 .sp .6
856 854 .RS 4n
857 855 The \fBreget\fR command acts like \fBget\fR, except that if \fIlocal-file\fR
858 856 exists and is smaller than \fIremote-file\fR, \fIlocal-file\fR is presumed to
859 857 be a partially transferred copy of \fIremote-file\fR and the transfer is
860 858 continued from the apparent point of failure. This command is useful when
861 859 transferring large files over networks that are prone to dropping connections.
862 860 .RE
863 861
864 862 .sp
865 863 .ne 2
866 864 .na
867 865 \fB\fBremotehelp\fR [ \fIcommand-name\fR ]\fR
868 866 .ad
869 867 .sp .6
870 868 .RS 4n
871 869 Requests help from the remote \fBFTP\fR server. If a \fIcommand-name\fR is
872 870 specified it is supplied to the server as well.
873 871 .RE
874 872
875 873 .sp
876 874 .ne 2
877 875 .na
878 876 \fB\fBrename\fR \fIfrom to\fR\fR
879 877 .ad
880 878 .sp .6
881 879 .RS 4n
882 880 Renames the file \fIfrom\fR on the remote machine to have the name \fIto\fR.
883 881 .RE
884 882
885 883 .sp
886 884 .ne 2
887 885 .na
888 886 \fB\fBreset\fR\fR
889 887 .ad
890 888 .sp .6
891 889 .RS 4n
892 890 Clears reply queue. This command re-synchronizes command/reply sequencing with
893 891 the remote \fBFTP\fR server. Resynchronization can be necessary following a
894 892 violation of the \fBFTP\fR protocol by the remote server.
895 893 .RE
896 894
897 895 .sp
898 896 .ne 2
899 897 .na
900 898 \fB\fBrestart\fR [ \fImarker\fR ]\fR
901 899 .ad
902 900 .sp .6
903 901 .RS 4n
904 902 Restarts the immediately following \fBget\fR or \fBput\fR at the indicated
905 903 marker. On UNIX systems, \fImarker\fR is usually a byte offset into the file.
906 904 When followed by an \fBmget\fR, the \fBrestart\fR applies to the first
907 905 \fBget\fR performed. Specifying a \fImarker\fR of \fB0\fR clears the restart
908 906 marker. If no argument is specified, the current restart status is displayed.
909 907 .RE
910 908
911 909 .sp
912 910 .ne 2
913 911 .na
914 912 \fB\fBrmdir\fR \fIdirectory-name\fR\fR
915 913 .ad
916 914 .sp .6
917 915 .RS 4n
918 916 Deletes a directory on the remote machine.
919 917 .RE
920 918
921 919 .sp
922 920 .ne 2
923 921 .na
924 922 \fB\fBrunique\fR\fR
925 923 .ad
926 924 .sp .6
927 925 .RS 4n
928 926 Toggles storing of files on the local system with unique filenames. If a file
929 927 already exists with a name equal to the target local filename for a \fBget\fR
930 928 or \fBmget\fR command, a \fB\&.1\fR is appended to the name. If the resulting
931 929 name matches another existing file, a \fB\&.2\fR is appended to the original
932 930 name. If this process continues up to \fB\&.99\fR, an error message is printed,
933 931 and the transfer does not take place. The generated unique filename is
934 932 reported. \fBrunique\fR does not affect local files generated from a shell
935 933 command. The default value is off.
936 934 .RE
937 935
938 936 .sp
939 937 .ne 2
940 938 .na
941 939 \fB\fBsafe\fR\fR
942 940 .ad
943 941 .sp .6
944 942 .RS 4n
945 943 Sets the protection level on data transfers to "\fBsafe\fR". Data transmissions
946 944 are integrity-protected by cryptographic checksum. If no \fBADAT\fR command
947 945 succeeded, then the only possible level is "\fBclear\fR".
948 946 .RE
949 947
950 948 .sp
951 949 .ne 2
952 950 .na
953 951 \fB\fBsend\fR \fIlocal-file\fR [ \fIremote-file\fR ]\fR
954 952 .ad
955 953 .sp .6
956 954 .RS 4n
957 955 A synonym for \fBput\fR.
958 956 .RE
959 957
960 958 .sp
961 959 .ne 2
962 960 .na
963 961 \fB\fBsendport\fR\fR
964 962 .ad
965 963 .sp .6
966 964 .RS 4n
967 965 Toggles the use of \fBPORT\fR commands. By default, \fBftp\fR attempts to use a
968 966 \fBPORT\fR command when establishing a connection for each data transfer. The
969 967 use of \fBPORT\fR commands can prevent delays when performing multiple file
970 968 transfers. If the \fBPORT\fR command fails, \fBftp\fR uses the default data
971 969 port. When the use of \fBPORT\fR commands is disabled, no attempt is made to
972 970 use \fBPORT\fR commands for each data transfer. This is useful when connected
973 971 to certain \fBFTP\fR implementations that ignore \fBPORT\fR commands but
974 972 incorrectly indicate they have been accepted.
975 973 .RE
976 974
977 975 .sp
978 976 .ne 2
979 977 .na
980 978 \fB\fBsite\fR \fIarg1\fR [ \fIarg2\fR ] ...\fR
981 979 .ad
982 980 .sp .6
983 981 .RS 4n
984 982 Sends the arguments specified, verbatim, to the remote \fBFTP\fR server as a
985 983 \fBSITE\fR command.
986 984 .RE
987 985
988 986 .sp
989 987 .ne 2
990 988 .na
991 989 \fB\fBstatus\fR\fR
992 990 .ad
993 991 .sp .6
994 992 .RS 4n
995 993 Show the current status of \fBftp\fR.
996 994 .RE
997 995
998 996 .sp
999 997 .ne 2
1000 998 .na
1001 999 \fB\fBstruct\fR [ \fIstruct-name\fR ]\fR
1002 1000 .ad
1003 1001 .sp .6
1004 1002 .RS 4n
1005 1003 Sets the file structure to \fIstruct-name\fR. The only valid \fIstruct-name\fR
1006 1004 is \fBfile\fR, which corresponds to the default "file" structure. The
1007 1005 implementation only supports \fBfile\fR, and requires that it be specified.
1008 1006 .RE
1009 1007
1010 1008 .sp
1011 1009 .ne 2
1012 1010 .na
1013 1011 \fB\fBsunique\fR\fR
1014 1012 .ad
1015 1013 .sp .6
1016 1014 .RS 4n
1017 1015 Toggles storing of files on remote machine under unique file names. The remote
1018 1016 \fBFTP\fR server must support the \fBSTOU\fR command for successful completion.
1019 1017 The remote server reports the unique name. Default value is off.
1020 1018 .RE
1021 1019
1022 1020 .sp
1023 1021 .ne 2
1024 1022 .na
1025 1023 \fB\fBtcpwindow\fR [ \fIsize\fR ]\fR
1026 1024 .ad
1027 1025 .sp .6
1028 1026 .RS 4n
1029 1027 Sets the \fBTCP\fR window size to be used for data connections. Specifying a
1030 1028 size of \fB0\fR stops the explicit setting of the \fBTCP\fR window size on data
1031 1029 connections. If no argument is specified, the current setting is displayed.
1032 1030 .RE
1033 1031
1034 1032 .sp
1035 1033 .ne 2
1036 1034 .na
1037 1035 \fB\fBtenex\fR\fR
1038 1036 .ad
1039 1037 .sp .6
1040 1038 .RS 4n
1041 1039 Sets the "representation type" to that needed to talk to \fBTENEX\fR machines.
1042 1040 .RE
1043 1041
1044 1042 .sp
1045 1043 .ne 2
1046 1044 .na
1047 1045 \fB\fBtrace\fR\fR
1048 1046 .ad
1049 1047 .sp .6
1050 1048 .RS 4n
1051 1049 Toggles packet tracing (unimplemented).
1052 1050 .RE
1053 1051
1054 1052 .sp
1055 1053 .ne 2
1056 1054 .na
1057 1055 \fB\fBtype\fR [ \fItype-name\fR ]\fR
1058 1056 .ad
1059 1057 .sp .6
1060 1058 .RS 4n
1061 1059 Sets the "representation type" to \fItype-name\fR. The valid \fItype-name\fRs
1062 1060 are \fBascii\fR for "network \fBASCII\fR", \fBbinary\fR or \fBimage\fR for
1063 1061 "image", and \fBtenex\fR for "local byte size" with a byte size of 8 (used to
1064 1062 talk to \fBTENEX\fR machines). If no type is specified, the current type is
1065 1063 printed. The default type is "network \fBASCII\fR".
1066 1064 .RE
1067 1065
1068 1066 .sp
1069 1067 .ne 2
1070 1068 .na
1071 1069 \fB\fBuser\fR \fIuser-name\fR [ \fIpassword\fR [ \fIaccount\fR ]]\fR
1072 1070 .ad
1073 1071 .sp .6
1074 1072 .RS 4n
1075 1073 Identify yourself to the remote \fBFTP\fR server. If the password is not
1076 1074 specified and the server requires it, \fBftp\fR prompts the user for it (after
1077 1075 disabling local echo). If an account field is not specified, and the \fBFTP\fR
1078 1076 server requires it, the user is prompted for it. If an account field is
1079 1077 specified, an account command is relayed to the remote server after the login
1080 1078 sequence is completed if the remote server did not require it for logging in.
1081 1079 Unless \fBftp\fR is invoked with "auto-login" disabled, this process is done
1082 1080 automatically on initial connection to the \fBFTP\fR server.
1083 1081 .RE
1084 1082
1085 1083 .sp
1086 1084 .ne 2
1087 1085 .na
1088 1086 \fB\fBverbose\fR\fR
1089 1087 .ad
1090 1088 .sp .6
1091 1089 .RS 4n
1092 1090 Toggles verbose mode. In verbose mode, all responses from the \fBFTP\fR server
1093 1091 are displayed to the user. In addition, if verbose mode is on, when a file
1094 1092 transfer completes, statistics regarding the efficiency of the transfer are
1095 1093 reported. By default, verbose mode is on if \fBftp\fR's commands are coming
1096 1094 from a terminal, and off otherwise.
1097 1095 .RE
1098 1096
1099 1097 .sp
1100 1098 .ne 2
1101 1099 .na
1102 1100 \fB\fB?\fR [ \fIcommand\fR ]\fR
1103 1101 .ad
1104 1102 .sp .6
1105 1103 .RS 4n
1106 1104 A synonym for \fBhelp\fR.
1107 1105 .RE
↓ open down ↓ |
1065 lines elided |
↑ open up ↑ |
1108 1106
1109 1107 .sp
1110 1108 .LP
1111 1109 Command arguments which have embedded spaces can be quoted with quote (\fB"\fR)
1112 1110 marks.
1113 1111 .sp
1114 1112 .LP
1115 1113 If any command argument which is not indicated as being optional is not
1116 1114 specified, \fBftp\fR prompts for that argument.
1117 1115 .SH ABORTING A FILE TRANSFER
1118 -.sp
1119 1116 .LP
1120 1117 To abort a file transfer, use the terminal interrupt key. Sending transfers is
1121 1118 immediately halted. Receiving transfers are halted by sending an \fBFTP\fR
1122 1119 protocol \fBABOR\fR command to the remote server, and discarding any further
1123 1120 data received. The speed at which this is accomplished depends upon the remote
1124 1121 server's support for \fBABOR\fR processing. If the remote server does not
1125 1122 support the \fBABOR\fR command, an \fBftp>\fR prompt does not appear until the
1126 1123 remote server has completed sending the requested file.
1127 1124 .sp
1128 1125 .LP
1129 1126 The terminal interrupt key sequence is ignored when \fBftp\fR has completed any
1130 1127 local processing and is awaiting a reply from the remote server. A long delay
1131 1128 in this mode can result from the \fBABOR\fR processing described above, or from
1132 1129 unexpected behavior by the remote server, including violations of the ftp
1133 1130 protocol. If the delay results from unexpected remote server behavior, the
1134 1131 local \fBftp\fR program must be killed by hand.
1135 1132 .SH FILE NAMING CONVENTIONS
1136 -.sp
1137 1133 .LP
1138 1134 Local files specified as arguments to \fBftp\fR commands are processed
1139 1135 according to the following rules.
1140 1136 .sp
1141 1137 .ne 2
1142 1138 .na
1143 1139 \fB1)\fR
1144 1140 .ad
1145 1141 .RS 6n
1146 1142 If the file name \fB\(mi\fR is specified, the standard input (for reading) or
1147 1143 standard output (for writing) is used.
1148 1144 .RE
1149 1145
1150 1146 .sp
1151 1147 .ne 2
1152 1148 .na
1153 1149 \fB2)\fR
1154 1150 .ad
1155 1151 .RS 6n
1156 1152 If the first character of the file name is \fB|\fR, the remainder of the
1157 1153 argument is interpreted as a shell command. \fBftp\fR then forks a shell, using
1158 1154 \fBpopen\fR(3C) with the argument supplied, and reads (writes) from the
1159 1155 standard output (standard input) of that shell. If the shell command includes
1160 1156 SPACE characters, the argument must be quoted; for example \fB"| ls
1161 1157 \fR\fB-lt\fR\fB"\fR. A particularly useful example of this mechanism is:
1162 1158 \fB"dir | more"\fR.
1163 1159 .RE
1164 1160
1165 1161 .sp
1166 1162 .ne 2
1167 1163 .na
1168 1164 \fB3)\fR
1169 1165 .ad
1170 1166 .RS 6n
1171 1167 Failing the above checks, if globbing is enabled, local file names are expanded
1172 1168 according to the rules used in the \fBsh\fR(1); see the \fBglob\fR command. If
1173 1169 the \fBftp\fR command expects a single local file (for example, \fBput\fR),
1174 1170 only the first filename generated by the globbing operation is used.
1175 1171 .RE
1176 1172
1177 1173 .sp
1178 1174 .ne 2
1179 1175 .na
1180 1176 \fB4)\fR
1181 1177 .ad
1182 1178 .RS 6n
1183 1179 For \fBmget\fR commands and \fBget\fR commands with unspecified local file
1184 1180 names, the local filename is the remote filename, which can be altered by a
1185 1181 \fBcase\fR, \fBntrans\fR, or \fBnmap\fR setting. The resulting filename can
1186 1182 then be altered if \fBrunique\fR is on.
1187 1183 .RE
1188 1184
1189 1185 .sp
1190 1186 .ne 2
1191 1187 .na
↓ open down ↓ |
45 lines elided |
↑ open up ↑ |
1192 1188 \fB5)\fR
1193 1189 .ad
1194 1190 .RS 6n
1195 1191 For \fBmput\fR commands and \fBput\fR commands with unspecified remote file
1196 1192 names, the remote filename is the local filename, which can be altered by a
1197 1193 \fBntrans\fR or \fBnmap\fR setting. The resulting filename can then be altered
1198 1194 by the remote server if \fBsunique\fR is on.
1199 1195 .RE
1200 1196
1201 1197 .SH FILE TRANSFER PARAMETERS
1202 -.sp
1203 1198 .LP
1204 1199 The \fBFTP\fR specification specifies many parameters which can affect a file
1205 1200 transfer.
1206 1201 .sp
1207 1202 .LP
1208 1203 The "representation type" can be one of "network \fBASCII\fR", "\fBEBCDIC\fR",
1209 1204 "image", or "local byte size" with a specified byte size (for PDP-10's and
1210 1205 PDP-20's mostly). The "network \fBASCII\fR" and "\fBEBCDIC\fR" types have a
1211 1206 further subtype which specifies whether vertical format control (\fBNEWLINE\fR
1212 1207 characters, form feeds, and so on) are to be passed through ("non-print"),
1213 1208 provided in \fBTELNET\fR format ("\fBTELNET\fR format controls"), or provided
1214 1209 in \fBASA\fR (\fBFORTRAN\fR) ("carriage control (\fBASA\fR)") format. \fBftp\fR
1215 1210 supports the "network \fBASCII\fR" (subtype "non-print" only) and "image"
1216 1211 types, plus "local byte size" with a byte size of 8 for communicating with
1217 1212 \fBTENEX\fR machines.
1218 1213 .sp
↓ open down ↓ |
6 lines elided |
↑ open up ↑ |
1219 1214 .LP
1220 1215 The "file structure" can be one of \fBfile\fR (no record structure),
1221 1216 \fBrecord\fR, or \fBpage\fR. \fBftp\fR supports only the default value, which
1222 1217 is \fBfile\fR.
1223 1218 .sp
1224 1219 .LP
1225 1220 The "transfer mode" can be one of \fBstream\fR, \fBblock\fR, or
1226 1221 \fBcompressed\fR. \fBftp\fR supports only the default value, which is
1227 1222 \fBstream\fR.
1228 1223 .SH USAGE
1229 -.sp
1230 1224 .LP
1231 1225 See \fBlargefile\fR(5) for the description of the behavior of \fBftp\fR when
1232 1226 encountering files greater than or equal to 2 Gbyte (2^31 bytes).
1233 1227 .sp
1234 1228 .LP
1235 1229 The \fBftp\fR command is IPv6-enabled. See \fBip6\fR(7P).
1236 1230 .SH FILES
1237 -.sp
1238 1231 .LP
1239 1232 \fB~/.netrc\fR
1240 1233 .SH ATTRIBUTES
1241 -.sp
1242 1234 .LP
1243 1235 See \fBattributes\fR(5) for descriptions of the following attributes:
1244 1236 .sp
1245 1237
1246 1238 .sp
1247 1239 .TS
1248 1240 box;
1249 1241 c | c
1250 1242 l | l .
1251 1243 ATTRIBUTE TYPE ATTRIBUTE VALUE
1252 1244 _
1253 1245 CSI enabled
1254 1246 .TE
1255 1247
1256 1248 .SH SEE ALSO
1257 -.sp
1258 1249 .LP
1259 -\fBls\fR(1), \fBrcp\fR(1), \fBsh\fR(1), \fBtar\fR(1), \fBin.ftpd\fR(1M),
1250 +\fBls\fR(1), \fBrcp\fR(1), \fBsh\fR(1), \fBtar\fR(1),
1260 1251 \fBpopen\fR(3C), \fBftp\fR(4), \fBftpusers\fR(4), \fBmech\fR(4),
1261 1252 \fBnetrc\fR(4), \fBattributes\fR(5), \fBlargefile\fR(5), \fBip6\fR(7P)
1262 1253 .sp
1263 1254 .LP
1264 1255 Allman, M., Ostermann, S., and Metz, C. \fIRFC 2428, FTP Extensions for IPv6
1265 1256 and NATs\fR. The Internet Society. September 1998.
1266 1257 .sp
1267 1258 .LP
1268 1259 Lunt, S. J. \fIRFC 2228, FTP Security Extensions\fR. Internet Draft. November
1269 1260 1993.
1270 1261 .sp
1271 1262 .LP
1272 1263 Postel, Jon, and Joyce Reynolds. \fIRFC 959, File Transfer Protocol (FTP )\fR.
1273 1264 Network Information Center. October 1985.
1274 1265 .sp
1275 1266 .LP
1276 1267 Piscitello, D. \fIRFC 1639, FTP Operation Over Big Address Records (FOOBAR)\fR.
1277 1268 Network Working Group. June 1994.
1278 1269 .SH NOTES
1279 -.sp
1280 1270 .LP
1281 1271 Failure to log in can arise from an explicit denial by the remote \fBFTP\fR
1282 1272 server because the account is listed in \fB/etc/ftpusers\fR. See
1283 -\fBin.ftpd\fR(1M) and \fBftpusers\fR(4).
1273 +\fBftpusers\fR(4).
1284 1274 .sp
1285 1275 .LP
1286 1276 Correct execution of many commands depends upon proper behavior by the remote
1287 1277 server.
1288 1278 .sp
1289 1279 .LP
1290 1280 An error in the treatment of carriage returns in the 4.2 \fBBSD\fR code
1291 1281 handling transfers with a "representation type" of "network \fBASCII\fR" has
1292 1282 been corrected. This correction can result in incorrect transfers of binary
1293 1283 files to and from 4.2 \fBBSD\fR servers using a "representation type" of
1294 1284 "network \fBASCII\fR". Avoid this problem by using the "image" type.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX