|
|
1.1 root 1: .\" Copyright (c) 1985 Regents of the University of California.
2: .\" All rights reserved. The Berkeley software License Agreement
3: .\" specifies the terms and conditions for redistribution.
4: .\"
5: .\" @(#)ftp.1 6.9 (Berkeley) 6/27/88
6: .\"
7: .TH FTP 1C "April 29, 1985"
8: .UC 5
9: .SH NAME
10: ftp \- ARPANET file transfer program
11: .SH SYNOPSIS
12: .B ftp
13: [
14: .B \-v
15: ] [
16: .B \-d
17: ] [
18: .B \-i
19: ] [
20: .B \-n
21: ] [
22: .B \-g
23: ] [
24: .B host
25: ]
26: .SH DESCRIPTION
27: .I Ftp
28: is the user interface to the ARPANET standard File Transfer Protocol.
29: The program allows a user to transfer files to and from a
30: remote network site.
31: .PP
32: The client host with which
33: .I ftp
34: is to communicate may be specified on the command line.
35: If this is done,
36: .I ftp
37: will immediately attempt to establish a connection to an FTP
38: server on that host; otherwise,
39: .I ftp
40: will enter its command interpreter and await instructions
41: from the user. When
42: .I ftp
43: is awaiting commands from the user the prompt \*(lqftp>\*(rq
44: is provided to the user. The following commands are recognized
45: by
46: .IR ftp :
47: .TP
48: \fB\&!\fP [ \fIcommand\fP [ \fIargs\fP ] ]
49: Invoke an interactive shell on the local machine.
50: If there are arguments, the first is taken to be a command to execute
51: directly, with the rest of the arguments as its arguments.
52: .TP
53: \fB\&$\fP \fImacro-name\fP [ \fIargs\fP ]
54: Execute the macro \fImacro-name\fP that was defined with the
55: \fBmacdef\fP command.
56: Arguments are passed to the macro unglobbed.
57: .TP
58: \fBaccount\fP [ \fIpasswd\fP ]
59: Supply a supplemental password required by a remote system for access
60: to resources once a login has been successfully completed.
61: If no argument is included, the user will be prompted for an account
62: password in a non-echoing input mode.
63: .TP
64: \fBappend\fP \fIlocal-file\fP [ \fIremote-file\fP ]
65: Append a local file to a file on the remote machine. If
66: .I remote-file
67: is left unspecified, the local file name is used in naming the
68: remote file after being altered by any
69: .I ntrans
70: or
71: .I nmap
72: setting.
73: File transfer uses the current settings for
74: .IR type ,
75: .IR format ,
76: .IR mode ,
77: and
78: .IR structure .
79: .TP
80: .B ascii
81: Set the file transfer
82: .I type
83: to network ASCII. This is the default type.
84: .TP
85: .B bell
86: Arrange that a bell be sounded after each file transfer
87: command is completed.
88: .TP
89: .B binary
90: Set the file transfer
91: .I type
92: to support binary image transfer.
93: .TP
94: .B bye
95: Terminate the FTP session with the remote server
96: and exit
97: .IR ftp .
98: An end of file will also terminate the session and exit.
99: .TP
100: .B case
101: Toggle remote computer file name case mapping during
102: .B mget
103: commands.
104: When
105: .B case
106: is on (default is off), remote computer file names with all letters in
107: upper case are written in the local directory with the letters mapped
108: to lower case.
109: .TP
110: .BI cd " remote-directory"
111: Change the working directory on the remote machine
112: to
113: .IR remote-directory .
114: .TP
115: .B cdup
116: Change the remote machine working directory to the parent of the
117: current remote machine working directory.
118: .TP
119: .B close
120: Terminate the FTP session with the remote server, and
121: return to the command interpreter.
122: Any defined macros are erased.
123: .TP
124: .B cr
125: Toggle carriage return stripping during
126: ascii type file retrieval.
127: Records are denoted by a carriage return/linefeed sequence
128: during ascii type file transfer.
129: When
130: .B cr
131: is on (the default), carriage returns are stripped from this
132: sequence to conform with the UNIX single linefeed record
133: delimiter.
134: Records on non-UNIX remote systems may contain single linefeeds;
135: when an ascii type transfer is made, these linefeeds may be
136: distinguished from a record delimiter only when
137: .B cr
138: is off.
139: .TP
140: .BI delete " remote-file"
141: Delete the file
142: .I remote-file
143: on the remote machine.
144: .TP
145: \fBdebug\fP [ \fIdebug-value\fP ]
146: Toggle debugging mode. If an optional
147: .I debug-value
148: is specified it is used to set the debugging level.
149: When debugging is on,
150: .I ftp
151: prints each command sent to the remote machine, preceded
152: by the string \*(lq-->\*(rq.
153: .TP
154: \fBdir\fP [ \fIremote-directory\fP ] [ \fIlocal-file\fP ]
155: Print a listing of the directory contents in the
156: directory,
157: .IR remote-directory ,
158: and, optionally, placing the output in
159: .IR local-file .
160: If interactive prompting is on,
161: .I ftp
162: will prompt the user to verify that the last argument is indeed the
163: target local file for receiving
164: .B dir
165: output.
166: If no directory is specified, the current working
167: directory on the remote machine is used. If no local
168: file is specified, or \fIlocal-file\fP is \fB-\fP,
169: output comes to the terminal.
170: .TP
171: .B disconnect
172: A synonym for
173: .BR close .
174: .TP
175: .BI form " format"
176: Set the file transfer
177: .I form
178: to
179: .IR format .
180: The default format is \*(lqfile\*(rq.
181: .TP
182: \fBget\fP \fIremote-file\fP [ \fIlocal-file\fP ]
183: Retrieve the
184: .I remote-file
185: and store it on the local machine. If the local
186: file name is not specified, it is given the same
187: name it has on the remote machine, subject to
188: alteration by the current
189: .IR case ,
190: .IR ntrans ,
191: and
192: .I nmap
193: settings.
194: The current settings for
195: .IR type ,
196: .IR form ,
197: .IR mode ,
198: and
199: .I structure
200: are used while transferring the file.
201: .TP
202: \fBglob\fP
203: Toggle filename expansion for \fBmdelete\fP, \fBmget\fP and \fBmput\fP.
204: If globbing is turned off with \fBglob\fP, the file name arguments
205: are taken literally and not expanded.
206: Globbing for \fBmput\fP is done as in \fBcsh\fP(1).
207: For \fBmdelete\fP and \fBmget\fP, each remote file name is expanded
208: separately on the remote machine and the lists are not merged.
209: Expansion of a directory name is likely to be
210: different from expansion of the name of an ordinary file:
211: the exact result depends on the foreign operating system and ftp server,
212: and can be previewed by doing `\fBmls\fP\ \fIremote-files\fP\ \fB-\fP'.
213: Note: \fBmget\fP and \fBmput\fP are not meant to transfer
214: entire directory subtrees of files. That can be done by
215: transferring a \fBtar\fP(1) archive of the subtree (in binary mode).
216: .TP
217: \fBhash\f
218: Toggle hash-sign (``#'') printing for each data block
219: transferred. The size of a data block is 1024 bytes.
220: .TP
221: \fBhelp\fP [ \fIcommand\fP ]
222: Print an informative message about the meaning of
223: .IR command .
224: If no argument is given,
225: .I ftp
226: prints a list of the known commands.
227: .TP
228: \fBlcd\fP [ \fIdirectory\fP ]
229: Change the working directory on the local machine. If
230: no
231: .I directory
232: is specified, the user's home directory is used.
233: .TP
234: \fBls\fP [ \fIremote-directory\fP ] [ \fIlocal-file\fP ]
235: Print an abbreviated listing of the contents of a
236: directory on the remote machine. If
237: .I remote-directory
238: is left unspecified, the current working directory is used.
239: If interactive prompting is on,
240: .I ftp
241: will prompt the user to verify that the last argument is indeed the
242: target local file for receiving
243: .B ls
244: output.
245: If no local file is specified, or if \fIlocal-file\fR is \fB-\fR,
246: the output is sent to the terminal.
247: .TP
248: \fBmacdef\fP \fImacro-name\fP
249: Define a macro.
250: Subsequent lines are stored as the macro
251: \fImacro-name\fP; a null line (consecutive newline characters
252: in a file or
253: carriage returns from the terminal) terminates macro input mode.
254: There is a limit of 16 macros and 4096 total characters in all
255: defined macros.
256: Macros remain defined until a
257: .B close
258: command is executed.
259: The macro processor interprets '$' and '\\' as special characters.
260: A '$' followed by a number (or numbers) is replaced by the
261: corresponding argument on the macro invocation command line.
262: A '$' followed by an 'i' signals that macro processor that the
263: executing macro is to be looped. On the first pass '$i' is
264: replaced by the first argument on the macro invocation command line,
265: on the second pass it is replaced by the second argument, and so on.
266: A '\\' followed by any character is replaced by that character.
267: Use the '\\' to prevent special treatment of the '$'.
268: .TP
269: \fBmdelete\fP [ \fIremote-files\fP ]
270: Delete the \fIremote-files\fP on the remote machine.
271: .TP
272: \fBmdir\fP \fIremote-files\fP \fIlocal-file\fP
273: Like \fBdir\fP, except multiple remote files may be specified.
274: If interactive prompting is on,
275: .I ftp
276: will prompt the user to verify that the last argument is indeed the
277: target local file for receiving
278: .B mdir
279: output.
280: .TP
281: \fBmget\fP \fIremote-files\fP
282: Expand the \fIremote-files\fP on the remote machine
283: and do a \fBget\fP for each file name thus produced.
284: See \fBglob\fR for details on the filename expansion.
285: Resulting file names will then be processed according to
286: .IR case ,
287: .IR ntrans ,
288: and
289: .I nmap
290: settings.
291: Files are transferred into the local working directory,
292: which can be changed with `\fBlcd\fP\ directory';
293: new local directories can be created with `\fB!\fP\ mkdir\ directory'.
294: .TP
295: \fBmkdir\fP \fIdirectory-name\fP
296: Make a directory on the remote machine.
297: .TP
298: \fBmls\fP \fIremote-files\fP \fIlocal-file\fP
299: Like \fBls\fP, except multiple remote files may be specified.
300: If interactive prompting is on,
301: .I ftp
302: will prompt the user to verify that the last argument is indeed the
303: target local file for receiving
304: .B mls
305: output.
306: .TP
307: \fBmode\fP [ \fImode-name\fP ]
308: Set the file transfer
309: .I mode
310: to
311: .IR mode-name .
312: The default mode is \*(lqstream\*(rq mode.
313: .TP
314: \fBmput\fP \fIlocal-files\fP
315: Expand wild cards in the list of local files given as arguments
316: and do a \fBput\fR for each file in the resulting list.
317: See \fBglob\fP for details of filename expansion.
318: Resulting file names will then be processed according to
319: .I ntrans
320: and
321: .I nmap
322: settings.
323: .TP
324: \fBnmap\fP [ \fIinpattern\fP \fIoutpattern\fP ]
325: Set or unset the filename mapping mechanism.
326: If no arguments are specified, the filename mapping mechanism is unset.
327: If arguments are specified, remote filenames are mapped during
328: .B mput
329: commands and
330: .B put
331: commands issued without a specified remote target filename.
332: If arguments are specified, local filenames are mapped during
333: .B mget
334: commands and
335: .B get
336: commands issued without a specified local target filename.
337: This command is useful when connecting to a non-UNIX remote computer
338: with different file naming conventions or practices.
339: The mapping follows the pattern set by
340: .I inpattern
341: and
342: .IR outpattern .
343: .I Inpattern
344: is a template for incoming filenames (which may have already been
345: processed according to the
346: .B ntrans
347: and
348: .B case
349: settings).
350: Variable templating is accomplished by including the sequences '$1', '$2', ..., '$9' in
351: .IR inpattern .
352: Use '\\' to prevent this special treatment of the '$' character.
353: All other characters are treated literally, and are used to determine the
354: .B nmap
355: .I inpattern
356: variable values.
357: For exmaple, given
358: .I inpattern
359: $1.$2 and the remote file name "mydata.data", $1 would have the value
360: "mydata", and $2 would have the value "data".
361: The
362: .I outpattern
363: determines the resulting mapped filename.
364: The sequences '$1', '$2', ...., '$9' are replaced by any value resulting
365: from the
366: .I inpattern
367: template.
368: The sequence '$0' is replace by the original filename.
369: Additionally, the sequence '[\fIseq1\fP,\fIseq2\f\P]' is replaced by
370: .I seq1
371: if
372: .I seq1
373: is not a null string; otherwise it is replaced by
374: .IR seq2 .
375: For example, the command "nmap $1.$2.$3 [$1,$2].[$2,file]" would yield
376: the output filename "myfile.data" for input filenames "myfile.data" and
377: "myfile.data.old", "myfile.file" for the input filename "myfile", and
378: "myfile.myfile" for the input filename ".myfile".
379: Spaces may be included in
380: .IR outpattern ,
381: as in the example: nmap $1 |sed "s/ *$//" > $1 .
382: Use the '\\' character to prevent special treatment
383: of the '$', '[', ']', and ',' characters.
384: .TP
385: \fBntrans\fP [ \fIinchars\fP [ \fIoutchars\fP ] ]
386: Set or unset the filename character translation mechanism.
387: If no arguments are specified, the filename character
388: translation mechanism is unset.
389: If arguments are specified, characters in
390: remote filenames are translated during
391: .B mput
392: commands and
393: .B put
394: commands issued without a specified remote target filename.
395: If arguments are specified, characters in
396: local filenames are translated during
397: .B mget
398: commands and
399: .B get
400: commands issued without a specified local target filename.
401: This command is useful when connecting to a non-UNIX remote computer
402: with different file naming conventions or practices.
403: Characters in a filename matching a character in
404: .I inchars
405: are replaced with the corresponding character in
406: .IR outchars .
407: If the character's position in
408: .I inchars
409: is longer than the length of
410: .IR outchars ,
411: the character is deleted from the file name.
412: .TP
413: \fBopen\fP \fIhost\fP [ \fIport\fP ]
414: Establish a connection to the specified
415: .I host
416: FTP server. An optional port number may be supplied,
417: in which case,
418: .I ftp
419: will attempt to contact an FTP server at that port.
420: If the
421: .I auto-login
422: option is on (default),
423: .I ftp
424: will also attempt to automatically log the user in to
425: the FTP server (see below).
426: .TP
427: .B prompt
428: Toggle interactive prompting. Interactive prompting
429: occurs during multiple file transfers to allow the
430: user to selectively retrieve or store files.
431: If prompting is turned off (default is on), any \fBmget\fP or \fBmput\fP
432: will transfer all files, and any \fBmdelete\fP will delete all files.
433: .TP
434: \fBproxy\fP \fIftp-command\fP
435: Execute an ftp command on a secondary control connection.
436: This command allows simultaneous connection to two remote ftp
437: servers for transferring files between the two servers.
438: The first
439: .B proxy
440: command should be an
441: .BR open ,
442: to establish the secondary control connection.
443: Enter the command "proxy ?" to see other ftp commands executable on the
444: secondary connection.
445: The following commands behave differently when prefaced by
446: .BR proxy :
447: .B open
448: will not define new macros during the auto-login process,
449: .B close
450: will not erase existing macro definitions,
451: .B get
452: and
453: .B mget
454: transfer files from the host on the primary control connection
455: to the host on the secondary control connection, and
456: .BR put ,
457: .BR mput ,
458: and
459: .B append
460: transfer files from the host on the secondary control connection
461: to the host on the primary control connection.
462: Third party file transfers depend upon support of the ftp protocol
463: PASV command by the server on the secondary control connection.
464: .TP
465: \fBput\fP \fIlocal-file\fP [ \fIremote-file\fP ]
466: Store a local file on the remote machine. If
467: .I remote-file
468: is left unspecified, the local file name is used
469: after processing according to any
470: .I ntrans
471: or
472: .I nmap
473: settings
474: in naming the remote file. File transfer uses the
475: current settings for
476: .IR type ,
477: .IR format ,
478: .IR mode ,
479: and
480: .IR structure .
481: .TP
482: .B pwd
483: Print the name of the current working directory on the remote
484: machine.
485: .TP
486: .B quit
487: A synonym for
488: .BR bye .
489: .TP
490: .BI quote " arg1 arg2 ..."
491: The arguments specified are sent, verbatim, to the remote FTP
492: server.
493: .TP
494: \fBrecv\fP \fIremote-file\fP [ \fIlocal-file\fP ]
495: A synonym for get.
496: .TP
497: \fBremotehelp\fP [ \fIcommand-name\fP ]
498: Request help from the remote FTP server. If a
499: .I command-name
500: is specified it is supplied to the server as well.
501: .TP
502: \fBrename\fP [ \fIfrom\fP ] [ \fIto\fP ]
503: Rename the file
504: .I from
505: on the remote machine, to the file
506: .IR to .
507: .TP
508: .B reset
509: Clear reply queue.
510: This command re-synchronizes command/reply sequencing with the remote
511: ftp server.
512: Resynchronization may be neccesary following a violation of the ftp protocol
513: by the remote server.
514: .TP
515: .BI rmdir " directory-name"
516: Delete a directory on the remote machine.
517: .TP
518: .B runique
519: Toggle storing of files on the local system with unique filenames.
520: If a file already exists with a name equal to the target
521: local filename for a
522: .B get
523: or
524: .B mget
525: command, a ".1" is appended to the name.
526: If the resulting name matches another existing file,
527: a ".2" is appended to the original name.
528: If this process continues up to ".99", an error
529: message is printed, and the transfer does not take place.
530: The generated unique filename will be reported.
531: Note that
532: .B runique
533: will not affect local files generated from a shell command
534: (see below).
535: The default value is off.
536: .TP
537: \fBsend\fP \fIlocal-file\fP [ \fIremote-file\fP ]
538: A synonym for put.
539: .TP
540: .B sendport
541: Toggle the use of PORT commands. By default,
542: .I ftp
543: will attempt to use a PORT command when establishing
544: a connection for each data transfer.
545: The use of PORT commands can prevent delays
546: when performing multiple file transfers. If the PORT
547: command fails,
548: .I ftp
549: will use the default data port. When the use of PORT
550: commands is disabled, no attempt will be made to use
551: PORT commands for each data transfer. This is useful
552: for certain FTP implementations which do ignore PORT
553: commands but, incorrectly, indicate they've been accepted.
554: .TP
555: .B status
556: Show the current status of
557: .IR ftp .
558: .TP
559: \fBstruct\fP [ \fIstruct-name\fP ]
560: Set the file transfer
561: .I structure
562: to
563: .IR struct-name .
564: By default \*(lqstream\*(rq structure is used.
565: .TP
566: .B sunique
567: Toggle storing of files on remote machine under unique file names.
568: Remote ftp server must support ftp protocol STOU command for
569: successful completion.
570: The remote server will report unique name.
571: Default value is off.
572: .TP
573: .B tenex
574: Set the file transfer type to that needed to
575: talk to TENEX machines.
576: .TP
577: .B trace
578: Toggle packet tracing.
579: .TP
580: \fBtype\fP [ \fItype-name\fP ]
581: Set the file transfer
582: .I type
583: to
584: .IR type-name .
585: If no type is specified, the current type
586: is printed. The default type is network ASCII.
587: .TP
588: \fBuser\fP \fIuser-name\fP [ \fIpassword\fP ] [ \fIaccount\fP ]
589: Identify yourself to the remote FTP server. If the
590: password is not specified and the server requires it,
591: .I ftp
592: will prompt the user for it (after disabling local echo).
593: If an account field is not specified, and the FTP server
594: requires it, the user will be prompted for it.
595: If an account field is specified, an account command will
596: be relayed to the remote server after the login sequence
597: is completed if the remote server did not require it
598: for logging in.
599: Unless
600: .I ftp
601: is invoked with \*(lqauto-login\*(rq disabled, this
602: process is done automatically on initial connection to
603: the FTP server.
604: .TP
605: .B verbose
606: Toggle verbose mode. In verbose mode, all responses from
607: the FTP server are displayed to the user. In addition,
608: if verbose is on, when a file transfer completes, statistics
609: regarding the efficiency of the transfer are reported. By default,
610: verbose is on.
611: .TP
612: \fB?\fP [ \fIcommand\fP ]
613: A synonym for help.
614: .PP
615: Command arguments which have embedded spaces may be quoted with
616: quote (") marks.
617: .SH "ABORTING A FILE TRANSFER"
618: To abort a file transfer, use the terminal interrupt key
619: (usually Ctrl-C).
620: Sending transfers will be immediately halted.
621: Receiving transfers will be halted by sending a ftp protocol ABOR
622: command to the remote server, and discarding any further data received.
623: The speed at which this is accomplished depends upon the remote
624: server's support for ABOR processing.
625: If the remote server does not support the ABOR command, an "ftp>"
626: prompt will not appear until the remote server has completed
627: sending the requested file.
628: .PP
629: The terminal interrupt key sequence will be ignored when
630: .I ftp
631: has completed any local processing and is awaiting a reply
632: from the remote server.
633: A long delay in this mode may result from the ABOR processing described
634: above, or from unexpected behavior by the remote server, including
635: violations of the ftp protocol.
636: If the delay results from unexpected remote server behavior, the local
637: .I ftp
638: program must be killed by hand.
639: .SH "FILE NAMING CONVENTIONS"
640: Files specified as arguments to
641: .I ftp
642: commands are processed according to the following rules.
643: .TP
644: 1)
645: If the file name \*(lq\-\*(rq is specified, the
646: .B stdin
647: (for reading) or
648: .B stdout
649: (for writing) is used.
650: .TP
651: 2)
652: If the first character of the file name is \*(lq|\*(rq, the
653: remainder of the argument is interpreted as a shell command.
654: .I Ftp
655: then forks a shell, using
656: .IR popen (3)
657: with the argument supplied, and reads (writes) from the stdout
658: (stdin). If the shell command includes spaces, the argument
659: must be quoted; e.g. \*(lq"| ls -lt"\*(rq. A particularly
660: useful example of this mechanism is: \*(lqdir |more\*(rq.
661: .TP
662: 3)
663: Failing the above checks, if ``globbing'' is enabled,
664: local file names are expanded
665: according to the rules used in the
666: .IR csh (1);
667: c.f. the
668: .I glob
669: command.
670: If the
671: .I ftp
672: command expects a single local file ( .e.g.
673: .BR put ),
674: only the first filename generated by the "globbing" operation is used.
675: .TP
676: 4)
677: For
678: .B mget
679: commands and
680: .B get
681: commands with unspecified local file names, the local filename is
682: the remote filename, which may be altered by a
683: .BR case ,
684: .BR ntrans ,
685: or
686: .B nmap
687: setting.
688: The resulting filename may then be altered if
689: .B runique
690: is on.
691: .TP
692: 5)
693: For
694: .B mput
695: commands and
696: .B put
697: commands with unspecified remote file names, the remote filename is
698: the local filename, which may be altered by a
699: .B ntrans
700: or
701: .B nmap
702: setting.
703: The resulting filename may then be altered by the remote server if
704: .B sunique
705: is on.
706: .SH "FILE TRANSFER PARAMETERS"
707: The FTP specification specifies many parameters which may
708: affect a file transfer. The
709: .I type
710: may be one of \*(lqascii\*(rq, \*(lqimage\*(rq (binary),
711: \*(lqebcdic\*(rq, and \*(lqlocal byte size\*(rq (for PDP-10's
712: and PDP-20's mostly).
713: .I Ftp
714: supports the ascii and image types of file transfer,
715: plus local byte size 8 for \fBtenex\fP mode transfers.
716: .PP
717: .I Ftp
718: supports only the default values for the remaining
719: file transfer parameters:
720: .IR mode ,
721: .IR form ,
722: and
723: .IR struct .
724: .SH OPTIONS
725: Options may be specified at the command line, or to the
726: command interpreter.
727: .PP
728: The
729: .B \-v
730: (verbose on) option forces
731: .I ftp
732: to show all responses from the remote server, as well
733: as report on data transfer statistics.
734: .PP
735: The
736: .B \-n
737: option restrains
738: .I ftp
739: from attempting \*(lqauto-login\*(rq upon initial connection.
740: If auto-login is enabled,
741: .I ftp
742: will check the
743: .I .netrc
744: (see below) file in the user's home directory for an entry describing
745: an account on the remote machine. If no entry exists,
746: .I ftp
747: will prompt for the remote machine login name (default is the user
748: identity on the local machine), and, if necessary, prompt for a password
749: and an account with which to login.
750: .PP
751: The
752: .B \-i
753: option turns off interactive prompting during
754: multiple file transfers.
755: .PP
756: The
757: .B \-d
758: option enables debugging.
759: .PP
760: The
761: .B \-g
762: option disables file name globbing.
763: .SH "THE .netrc FILE"
764: The .netrc file contains login and initialization information
765: used by the auto-login process.
766: It resides in the user's home directory.
767: The following tokens are recognized; they may be separated by spaces,
768: tabs, or new-lines:
769: .TP
770: \fBmachine\fP \fIname\fP
771: Identify a remote machine name.
772: The auto-login process searches the .netrc file for a
773: .B machine
774: token that matches the remote machine specified on the
775: .I ftp
776: command line or as an
777: .B open
778: command argument.
779: Once a match is made, the subsequent .netrc tokens are processed,
780: stopping when the end of file is reached or another
781: .B machine
782: token is encountered.
783: .TP
784: \fBlogin\fP \fIname\fP
785: Identify a user on the remote machine.
786: If this token is present, the auto-login process will initiate
787: a login using the specified name.
788: .TP
789: \fBpassword\fP \fIstring\fP
790: Supply a password.
791: If this token is present, the auto-login process will supply the
792: specified string if the remote server requires a password as part
793: of the login process.
794: Note that if this token is present in the .netrc file,
795: .I ftp
796: will abort the auto-login process if the .netrc is readable by
797: anyone besides the user.
798: .TP
799: \fBaccount\fP \fIstring\fP
800: Supply an additional account password.
801: If this token is present, the auto-login process will supply the
802: specified string if the remote server requires an additional
803: account password, or the auto-login process will initiate an
804: ACCT command if it does not.
805: .TP
806: \fBmacdef\fP \fIname\fP
807: Define a macro.
808: This token functions like the
809: .I ftp
810: .B macdef
811: command functions.
812: A macro is defined with the specified name; its contents begin with the
813: next .netrc line and continue until a null line (consecutive new-line
814: characters) is encountered.
815: If a macro named
816: .I init
817: is defined, it is automatically executed as the last step in the
818: auto-login process.
819: .SH "SEE ALSO"
820: ftpd(8)
821: .SH BUGS
822: Correct execution of many commands depends upon proper behavior
823: by the remote server.
824: .PP
825: An error in the treatment of carriage returns
826: in the 4.2BSD UNIX ascii-mode transfer code
827: has been corrected.
828: This correction may result in incorrect transfers of binary files
829: to and from 4.2BSD servers using the ascii type.
830: Avoid this problem by using the binary image type.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.