2
FTP(1) BSD General Commands Manual FTP(1)
5
ffttpp -- ARPANET file transfer program
8
ffttpp [--KK] [--dd] [--gg] [--ii] [--ll] [--nn] [--pp] [--tt] [--vv] [--xx] [----nnoo--ggssss--bbiinnddiinnggss]
9
[----nnoo--ggssss--ddeelleeggaattee] [_h_o_s_t]
11
DDEESSCCRRIIPPTTIIOONN
12
ffttpp is the user interface to the ARPANET standard File Transfer Protocol.
13
The program allows a user to transfer files to and from a remote network
16
Modifications have been made so that it almost follows the FTP Security
19
Options may be specified at the command line, or to the command inter-
22
--KK Disable Kerberos authentication.
24
--tt Enables packet tracing.
26
--vv Verbose option forces ffttpp to show all responses from the remote
27
server, as well as report on data transfer statistics.
29
--nn Restrains ffttpp from attempting ``auto-login'' upon initial connec-
30
tion. If auto-login is enabled, ffttpp will check the _._n_e_t_r_c (see
31
below) file in the user's home directory for an entry describing an
32
account on the remote machine. If no entry exists, ffttpp will prompt
33
for the remote machine login name (default is the user identity on
34
the local machine), and, if necessary, prompt for a password and an
35
account with which to login.
37
--ii Turns off interactive prompting during multiple file transfers.
39
--pp Turn on passive mode.
41
--dd Enables debugging.
43
--gg Disables file name globbing.
44
.It Fl Fl no-gss-bindings Don't use GSS-API bindings when talking
45
to peer. IP addresses will not be checked to ensure they match.
47
----nnoo--ggssss--ddeelleeggaattee
48
Disable delegation of GSSAPI credentials.
50
--ll Disables command line editing.
52
--xx Encrypt command and data channel.
54
The client host with which ffttpp is to communicate may be specified on the
55
command line. If this is done, ffttpp will immediately attempt to establish
56
a connection to an FTP server on that host; otherwise, ffttpp will enter its
57
command interpreter and await instructions from the user. When ffttpp is
58
awaiting commands from the user the prompt `ftp>' is provided to the
59
user. The following commands are recognized by ffttpp:
61
!! [_c_o_m_m_a_n_d [_a_r_g_s]]
62
Invoke an interactive shell on the local machine. If there
63
are arguments, the first is taken to be a command to execute
64
directly, with the rest of the arguments as its arguments.
66
$$ _m_a_c_r_o_-_n_a_m_e [_a_r_g_s]
67
Execute the macro _m_a_c_r_o_-_n_a_m_e that was defined with the mmaaccddeeff
68
command. Arguments are passed to the macro unglobbed.
70
aaccccoouunntt [_p_a_s_s_w_d]
71
Supply a supplemental password required by a remote system
72
for access to resources once a login has been successfully
73
completed. If no argument is included, the user will be
74
prompted for an account password in a non-echoing input mode.
76
aappppeenndd _l_o_c_a_l_-_f_i_l_e [_r_e_m_o_t_e_-_f_i_l_e]
77
Append a local file to a file on the remote machine. If
78
_r_e_m_o_t_e_-_f_i_l_e is left unspecified, the local file name is used
79
in naming the remote file after being altered by any nnttrraannss
80
or nnmmaapp setting. File transfer uses the current settings for
81
ttyyppee, ffoorrmmaatt, mmooddee, and ssttrruuccttuurree.
83
aasscciiii Set the file transfer ttyyppee to network ASCII. This is the
86
bbeellll Arrange that a bell be sounded after each file transfer com-
89
bbiinnaarryy Set the file transfer ttyyppee to support binary image transfer.
91
bbyyee Terminate the FTP session with the remote server and exit
92
ffttpp. An end of file will also terminate the session and
95
ccaassee Toggle remote computer file name case mapping during mmggeett
96
commands. When ccaassee is on (default is off), remote computer
97
file names with all letters in upper case are written in the
98
local directory with the letters mapped to lower case.
100
ccdd _r_e_m_o_t_e_-_d_i_r_e_c_t_o_r_y
101
Change the working directory on the remote machine to
102
_r_e_m_o_t_e_-_d_i_r_e_c_t_o_r_y.
104
ccdduupp Change the remote machine working directory to the parent of
105
the current remote machine working directory.
107
cchhmmoodd _m_o_d_e _f_i_l_e_-_n_a_m_e
108
Change the permission modes of the file _f_i_l_e_-_n_a_m_e on the
109
remote sytem to _m_o_d_e.
111
cclloossee Terminate the FTP session with the remote server, and return
112
to the command interpreter. Any defined macros are erased.
114
ccrr Toggle carriage return stripping during ascii type file
115
retrieval. Records are denoted by a carriage return/linefeed
116
sequence during ascii type file transfer. When ccrr is on (the
117
default), carriage returns are stripped from this sequence to
118
conform with the UNIX single linefeed record delimiter.
119
Records on non-UNIX remote systems may contain single line-
120
feeds; when an ascii type transfer is made, these linefeeds
121
may be distinguished from a record delimiter only when ccrr is
124
ddeelleettee _r_e_m_o_t_e_-_f_i_l_e
125
Delete the file _r_e_m_o_t_e_-_f_i_l_e on the remote machine.
127
ddeebbuugg [_d_e_b_u_g_-_v_a_l_u_e]
128
Toggle debugging mode. If an optional _d_e_b_u_g_-_v_a_l_u_e is speci-
129
fied it is used to set the debugging level. When debugging
130
is on, ffttpp prints each command sent to the remote machine,
131
preceded by the string `-->'
133
ddiirr [_r_e_m_o_t_e_-_d_i_r_e_c_t_o_r_y] [_l_o_c_a_l_-_f_i_l_e]
134
Print a listing of the directory contents in the directory,
135
_r_e_m_o_t_e_-_d_i_r_e_c_t_o_r_y, and, optionally, placing the output in
136
_l_o_c_a_l_-_f_i_l_e. If interactive prompting is on, ffttpp will prompt
137
the user to verify that the last argument is indeed the tar-
138
get local file for receiving ddiirr output. If no directory is
139
specified, the current working directory on the remote
140
machine is used. If no local file is specified, or
141
_l_o_c_a_l_-_f_i_l_e is --, output comes to the terminal.
143
ddiissccoonnnneecctt A synonym for _c_l_o_s_e.
145
ffoorrmm _f_o_r_m_a_t
146
Set the file transfer ffoorrmm to _f_o_r_m_a_t. The default format is
149
ggeett _r_e_m_o_t_e_-_f_i_l_e [_l_o_c_a_l_-_f_i_l_e]
150
Retrieve the _r_e_m_o_t_e_-_f_i_l_e and store it on the local machine.
151
If the local file name is not specified, it is given the same
152
name it has on the remote machine, subject to alteration by
153
the current ccaassee, nnttrraannss, and nnmmaapp settings. The current
154
settings for ttyyppee, ffoorrmm, mmooddee, and ssttrruuccttuurree are used while
155
transferring the file.
157
gglloobb Toggle filename expansion for mmddeelleettee, mmggeett and mmppuutt. If
158
globbing is turned off with gglloobb, the file name arguments are
159
taken literally and not expanded. Globbing for mmppuutt is done
160
as in csh(1). For mmddeelleettee and mmggeett, each remote file name is
161
expanded separately on the remote machine and the lists are
162
not merged. Expansion of a directory name is likely to be
163
different from expansion of the name of an ordinary file: the
164
exact result depends on the foreign operating system and ftp
165
server, and can be previewed by doing `mls remote-files -'.
166
As a security measure, remotely globbed files that starts
167
with `/' or contains `../', will not be automatically
168
received. If you have interactive prompting turned off, these
169
filenames will be ignored. Note: mmggeett and mmppuutt are not meant
170
to transfer entire directory subtrees of files. That can be
171
done by transferring a tar(1) archive of the subtree (in
174
hhaasshh Toggle hash-sign (``#'') printing for each data block trans-
175
ferred. The size of a data block is 1024 bytes.
177
hheellpp [_c_o_m_m_a_n_d]
178
Print an informative message about the meaning of _c_o_m_m_a_n_d.
179
If no argument is given, ffttpp prints a list of the known com-
182
iiddllee [_s_e_c_o_n_d_s]
183
Set the inactivity timer on the remote server to _s_e_c_o_n_d_s sec-
184
onds. If _s_e_c_o_n_d_s is omitted, the current inactivity timer is
187
llccdd [_d_i_r_e_c_t_o_r_y]
188
Change the working directory on the local machine. If no
189
_d_i_r_e_c_t_o_r_y is specified, the user's home directory is used.
191
llss [_r_e_m_o_t_e_-_d_i_r_e_c_t_o_r_y] [_l_o_c_a_l_-_f_i_l_e]
192
Print a listing of the contents of a directory on the remote
193
machine. The listing includes any system-dependent informa-
194
tion that the server chooses to include; for example, most
195
UNIX systems will produce output from the command `ls -l'.
196
(See also nnlliisstt.) If _r_e_m_o_t_e_-_d_i_r_e_c_t_o_r_y is left unspecified,
197
the current working directory is used. If interactive
198
prompting is on, ffttpp will prompt the user to verify that the
199
last argument is indeed the target local file for receiving
200
llss output. If no local file is specified, or if _l_o_c_a_l_-_f_i_l_e
201
is `--', the output is sent to the terminal.
203
mmaaccddeeff _m_a_c_r_o_-_n_a_m_e
204
Define a macro. Subsequent lines are stored as the macro
205
_m_a_c_r_o_-_n_a_m_e; a null line (consecutive newline characters in a
206
file or carriage returns from the terminal) terminates macro
207
input mode. There is a limit of 16 macros and 4096 total
208
characters in all defined macros. Macros remain defined
209
until a cclloossee command is executed. The macro processor
210
interprets `$' and `\' as special characters. A `$' followed
211
by a number (or numbers) is replaced by the corresponding
212
argument on the macro invocation command line. A `$' fol-
213
lowed by an `i' signals that macro processor that the execut-
214
ing macro is to be looped. On the first pass `$i' is
215
replaced by the first argument on the macro invocation com-
216
mand line, on the second pass it is replaced by the second
217
argument, and so on. A `\' followed by any character is
218
replaced by that character. Use the `\' to prevent special
219
treatment of the `$'.
221
mmddeelleettee [_r_e_m_o_t_e_-_f_i_l_e_s]
222
Delete the _r_e_m_o_t_e_-_f_i_l_e_s on the remote machine.
224
mmddiirr _r_e_m_o_t_e_-_f_i_l_e_s _l_o_c_a_l_-_f_i_l_e
225
Like ddiirr, except multiple remote files may be specified. If
226
interactive prompting is on, ffttpp will prompt the user to ver-
227
ify that the last argument is indeed the target local file
228
for receiving mmddiirr output.
230
mmggeett _r_e_m_o_t_e_-_f_i_l_e_s
231
Expand the _r_e_m_o_t_e_-_f_i_l_e_s on the remote machine and do a ggeett
232
for each file name thus produced. See gglloobb for details on
233
the filename expansion. Resulting file names will then be
234
processed according to ccaassee, nnttrraannss, and nnmmaapp settings.
235
Files are transferred into the local working directory, which
236
can be changed with `lcd directory'; new local directories
237
can be created with `! mkdir directory'.
239
mmkkddiirr _d_i_r_e_c_t_o_r_y_-_n_a_m_e
240
Make a directory on the remote machine.
242
mmllss _r_e_m_o_t_e_-_f_i_l_e_s _l_o_c_a_l_-_f_i_l_e
243
Like nnlliisstt, except multiple remote files may be specified,
244
and the _l_o_c_a_l_-_f_i_l_e must be specified. If interactive prompt-
245
ing is on, ffttpp will prompt the user to verify that the last
246
argument is indeed the target local file for receiving mmllss
249
mmooddee [_m_o_d_e_-_n_a_m_e]
250
Set the file transfer mmooddee to _m_o_d_e_-_n_a_m_e. The default mode is
253
mmooddttiimmee _f_i_l_e_-_n_a_m_e
254
Show the last modification time of the file on the remote
257
mmppuutt _l_o_c_a_l_-_f_i_l_e_s
258
Expand wild cards in the list of local files given as argu-
259
ments and do a ppuutt for each file in the resulting list. See
260
gglloobb for details of filename expansion. Resulting file names
261
will then be processed according to nnttrraannss and nnmmaapp settings.
263
nneewweerr _f_i_l_e_-_n_a_m_e
264
Get the file only if the modification time of the remote file
265
is more recent that the file on the current system. If the
266
file does not exist on the current system, the remote file is
267
considered nneewweerr. Otherwise, this command is identical to
270
nnlliisstt [_r_e_m_o_t_e_-_d_i_r_e_c_t_o_r_y] [_l_o_c_a_l_-_f_i_l_e]
271
Print a list of the files in a directory on the remote
272
machine. If _r_e_m_o_t_e_-_d_i_r_e_c_t_o_r_y is left unspecified, the cur-
273
rent working directory is used. If interactive prompting is
274
on, ffttpp will prompt the user to verify that the last argument
275
is indeed the target local file for receiving nnlliisstt output.
276
If no local file is specified, or if _l_o_c_a_l_-_f_i_l_e is --, the
277
output is sent to the terminal.
279
nnmmaapp [_i_n_p_a_t_t_e_r_n _o_u_t_p_a_t_t_e_r_n]
280
Set or unset the filename mapping mechanism. If no arguments
281
are specified, the filename mapping mechanism is unset. If
282
arguments are specified, remote filenames are mapped during
283
mmppuutt commands and ppuutt commands issued without a specified
284
remote target filename. If arguments are specified, local
285
filenames are mapped during mmggeett commands and ggeett commands
286
issued without a specified local target filename. This com-
287
mand is useful when connecting to a non-UNIX remote computer
288
with different file naming conventions or practices. The
289
mapping follows the pattern set by _i_n_p_a_t_t_e_r_n and _o_u_t_p_a_t_t_e_r_n.
290
[_I_n_p_a_t_t_e_r_n] is a template for incoming filenames (which may
291
have already been processed according to the nnttrraannss and ccaassee
292
settings). Variable templating is accomplished by including
293
the sequences `$1', `$2', ..., `$9' in _i_n_p_a_t_t_e_r_n. Use `\' to
294
prevent this special treatment of the `$' character. All
295
other characters are treated literally, and are used to
296
determine the nnmmaapp [_i_n_p_a_t_t_e_r_n] variable values. For example,
297
given _i_n_p_a_t_t_e_r_n $1.$2 and the remote file name "mydata.data",
298
$1 would have the value "mydata", and $2 would have the value
299
"data". The _o_u_t_p_a_t_t_e_r_n determines the resulting mapped file-
300
name. The sequences `$1', `$2', ...., `$9' are replaced by
301
any value resulting from the _i_n_p_a_t_t_e_r_n template. The
302
sequence `$0' is replace by the original filename. Addition-
303
ally, the sequence `[_s_e_q_1, _s_e_q_2]' is replaced by [_s_e_q_1] if
304
_s_e_q_1 is not a null string; otherwise it is replaced by _s_e_q_2.
305
For example, the command
307
nmap $1.$2.$3 [$1,$2].[$2,file]
309
would yield the output filename "myfile.data" for input file-
310
names "myfile.data" and "myfile.data.old", "myfile.file" for
311
the input filename "myfile", and "myfile.myfile" for the
312
input filename ".myfile". Spaces may be included in
313
_o_u_t_p_a_t_t_e_r_n, as in the example: `nmap $1 sed "s/ *$//" > $1'
314
. Use the `\' character to prevent special treatment of the
315
`$','[','[', and `,' characters.
317
nnttrraannss [_i_n_c_h_a_r_s [_o_u_t_c_h_a_r_s]]
318
Set or unset the filename character translation mechanism.
319
If no arguments are specified, the filename character trans-
320
lation mechanism is unset. If arguments are specified, char-
321
acters in remote filenames are translated during mmppuutt com-
322
mands and ppuutt commands issued without a specified remote tar-
323
get filename. If arguments are specified, characters in
324
local filenames are translated during mmggeett commands and ggeett
325
commands issued without a specified local target filename.
326
This command is useful when connecting to a non-UNIX remote
327
computer with different file naming conventions or practices.
328
Characters in a filename matching a character in _i_n_c_h_a_r_s are
329
replaced with the corresponding character in _o_u_t_c_h_a_r_s. If
330
the character's position in _i_n_c_h_a_r_s is longer than the length
331
of _o_u_t_c_h_a_r_s, the character is deleted from the file name.
333
ooppeenn _h_o_s_t [_p_o_r_t]
334
Establish a connection to the specified _h_o_s_t FTP server. An
335
optional port number may be supplied, in which case, ffttpp will
336
attempt to contact an FTP server at that port. If the
337
aauuttoo--llooggiinn option is on (default), ffttpp will also attempt to
338
automatically log the user in to the FTP server (see below).
340
ppaassssiivvee Toggle passive mode. If passive mode is turned on (default
341
is off), the ftp client will send a PASV command for all data
342
connections instead of the usual PORT command. The PASV com-
343
mand requests that the remote server open a port for the data
344
connection and return the address of that port. The remote
345
server listens on that port and the client connects to it.
346
When using the more traditional PORT command, the client lis-
347
tens on a port and sends that address to the remote server,
348
who connects back to it. Passive mode is useful when using
349
ffttpp through a gateway router or host that controls the direc-
350
tionality of traffic. (Note that though ftp servers are
351
required to support the PASV command by RFC 1123, some do
354
pprroommpptt Toggle interactive prompting. Interactive prompting occurs
355
during multiple file transfers to allow the user to selec-
356
tively retrieve or store files. If prompting is turned off
357
(default is on), any mmggeett or mmppuutt will transfer all files,
358
and any mmddeelleettee will delete all files.
360
pprrooxxyy _f_t_p_-_c_o_m_m_a_n_d
361
Execute an ftp command on a secondary control connection.
362
This command allows simultaneous connection to two remote ftp
363
servers for transferring files between the two servers. The
364
first pprrooxxyy command should be an ooppeenn, to establish the sec-
365
ondary control connection. Enter the command "proxy ?" to
366
see other ftp commands executable on the secondary connec-
367
tion. The following commands behave differently when pref-
368
aced by pprrooxxyy: ooppeenn will not define new macros during the
369
auto-login process, cclloossee will not erase existing macro defi-
370
nitions, ggeett and mmggeett transfer files from the host on the
371
primary control connection to the host on the secondary con-
372
trol connection, and ppuutt, mmppuutt, and aappppeenndd transfer files
373
from the host on the secondary control connection to the host
374
on the primary control connection. Third party file trans-
375
fers depend upon support of the ftp protocol PASV command by
376
the server on the secondary control connection.
378
ppuutt _l_o_c_a_l_-_f_i_l_e [_r_e_m_o_t_e_-_f_i_l_e]
379
Store a local file on the remote machine. If _r_e_m_o_t_e_-_f_i_l_e is
380
left unspecified, the local file name is used after process-
381
ing according to any nnttrraannss or nnmmaapp settings in naming the
382
remote file. File transfer uses the current settings for
383
ttyyppee, ffoorrmmaatt, mmooddee, and ssttrruuccttuurree.
385
ppwwdd Print the name of the current working directory on the remote
388
qquuiitt A synonym for bbyyee.
390
qquuoottee _a_r_g_1 _a_r_g_2 _._._.
391
The arguments specified are sent, verbatim, to the remote FTP
394
rreeccvv _r_e_m_o_t_e_-_f_i_l_e [_l_o_c_a_l_-_f_i_l_e]
397
rreeggeett _r_e_m_o_t_e_-_f_i_l_e [_l_o_c_a_l_-_f_i_l_e]
398
Reget acts like get, except that if _l_o_c_a_l_-_f_i_l_e exists and is
399
smaller than _r_e_m_o_t_e_-_f_i_l_e, _l_o_c_a_l_-_f_i_l_e is presumed to be a par-
400
tially transferred copy of _r_e_m_o_t_e_-_f_i_l_e and the transfer is
401
continued from the apparent point of failure. This command
402
is useful when transferring very large files over networks
403
that are prone to dropping connections.
405
rreemmootteehheellpp [_c_o_m_m_a_n_d_-_n_a_m_e]
406
Request help from the remote FTP server. If a _c_o_m_m_a_n_d_-_n_a_m_e
407
is specified it is supplied to the server as well.
409
rreemmootteessttaattuuss [_f_i_l_e_-_n_a_m_e]
410
With no arguments, show status of remote machine. If
411
_f_i_l_e_-_n_a_m_e is specified, show status of _f_i_l_e_-_n_a_m_e on remote
414
rreennaammee [_f_r_o_m] [_t_o]
415
Rename the file _f_r_o_m on the remote machine, to the file _t_o.
417
rreesseett Clear reply queue. This command re-synchronizes com-
418
mand/reply sequencing with the remote ftp server. Resynchro-
419
nization may be necessary following a violation of the ftp
420
protocol by the remote server.
422
rreessttaarrtt _m_a_r_k_e_r
423
Restart the immediately following ggeett or ppuutt at the indicated
424
_m_a_r_k_e_r. On UNIX systems, marker is usually a byte offset
427
rrmmddiirr _d_i_r_e_c_t_o_r_y_-_n_a_m_e
428
Delete a directory on the remote machine.
430
rruunniiqquuee Toggle storing of files on the local system with unique file-
431
names. If a file already exists with a name equal to the
432
target local filename for a ggeett or mmggeett command, a ".1" is
433
appended to the name. If the resulting name matches another
434
existing file, a ".2" is appended to the original name. If
435
this process continues up to ".99", an error message is
436
printed, and the transfer does not take place. The generated
437
unique filename will be reported. Note that rruunniiqquuee will not
438
affect local files generated from a shell command (see
439
below). The default value is off.
441
sseenndd _l_o_c_a_l_-_f_i_l_e [_r_e_m_o_t_e_-_f_i_l_e]
444
sseennddppoorrtt Toggle the use of PORT commands. By default, ffttpp will
445
attempt to use a PORT command when establishing a connection
446
for each data transfer. The use of PORT commands can prevent
447
delays when performing multiple file transfers. If the PORT
448
command fails, ffttpp will use the default data port. When the
449
use of PORT commands is disabled, no attempt will be made to
450
use PORT commands for each data transfer. This is useful for
451
certain FTP implementations which do ignore PORT commands
452
but, incorrectly, indicate they've been accepted.
454
ssiittee _a_r_g_1 _a_r_g_2 _._._.
455
The arguments specified are sent, verbatim, to the remote FTP
456
server as a SITE command.
458
ssiizzee _f_i_l_e_-_n_a_m_e
459
Return size of _f_i_l_e_-_n_a_m_e on remote machine.
461
ssttaattuuss Show the current status of ffttpp.
463
ssttrruucctt [_s_t_r_u_c_t_-_n_a_m_e]
464
Set the file transfer _s_t_r_u_c_t_u_r_e to _s_t_r_u_c_t_-_n_a_m_e. By default
465
``stream'' structure is used.
467
ssuunniiqquuee Toggle storing of files on remote machine under unique file
468
names. Remote ftp server must support ftp protocol STOU com-
469
mand for successful completion. The remote server will
470
report unique name. Default value is off.
472
ssyysstteemm Show the type of operating system running on the remote
475
tteenneexx Set the file transfer type to that needed to talk to TENEX
478
ttrraaccee Toggle packet tracing.
480
ttyyppee [_t_y_p_e_-_n_a_m_e]
481
Set the file transfer ttyyppee to _t_y_p_e_-_n_a_m_e. If no type is spec-
482
ified, the current type is printed. The default type is net-
485
uummaasskk [_n_e_w_m_a_s_k]
486
Set the default umask on the remote server to _n_e_w_m_a_s_k. If
487
_n_e_w_m_a_s_k is omitted, the current umask is printed.
489
uusseerr _u_s_e_r_-_n_a_m_e [_p_a_s_s_w_o_r_d] [_a_c_c_o_u_n_t]
490
Identify yourself to the remote FTP server. If the _p_a_s_s_w_o_r_d
491
is not specified and the server requires it, ffttpp will prompt
492
the user for it (after disabling local echo). If an _a_c_c_o_u_n_t
493
field is not specified, and the FTP server requires it, the
494
user will be prompted for it. If an _a_c_c_o_u_n_t field is speci-
495
fied, an account command will be relayed to the remote server
496
after the login sequence is completed if the remote server
497
did not require it for logging in. Unless ffttpp is invoked
498
with ``auto-login'' disabled, this process is done automati-
499
cally on initial connection to the FTP server.
501
vveerrbboossee Toggle verbose mode. In verbose mode, all responses from the
502
FTP server are displayed to the user. In addition, if ver-
503
bose is on, when a file transfer completes, statistics
504
regarding the efficiency of the transfer are reported. By
505
default, verbose is on.
510
The following command can be used with ftpsec-aware servers.
512
pprroott _c_l_e_a_r | _s_a_f_e | _c_o_n_f_i_d_e_n_t_i_a_l | _p_r_i_v_a_t_e
513
Set the data protection level to the requested level.
515
The following command can be used with ftp servers that has implemented
516
the KAUTH site command.
518
kkaauutthh [_p_r_i_n_c_i_p_a_l]
519
Obtain remote tickets.
521
Command arguments which have embedded spaces may be quoted with quote `"'
524
AABBOORRTTIINNGG AA FFIILLEE TTRRAANNSSFFEERR
525
To abort a file transfer, use the terminal interrupt key (usually Ctrl-
526
C). Sending transfers will be immediately halted. Receiving transfers
527
will be halted by sending a ftp protocol ABOR command to the remote
528
server, and discarding any further data received. The speed at which
529
this is accomplished depends upon the remote server's support for ABOR
530
processing. If the remote server does not support the ABOR command, an
531
`ftp>' prompt will not appear until the remote server has completed send-
532
ing the requested file.
534
The terminal interrupt key sequence will be ignored when ffttpp has com-
535
pleted any local processing and is awaiting a reply from the remote
536
server. A long delay in this mode may result from the ABOR processing
537
described above, or from unexpected behavior by the remote server,
538
including violations of the ftp protocol. If the delay results from
539
unexpected remote server behavior, the local ffttpp program must be killed
542
FFIILLEE NNAAMMIINNGG CCOONNVVEENNTTIIOONNSS
543
Files specified as arguments to ffttpp commands are processed according to
546
1. If the file name `--' is specified, the _s_t_d_i_n (for reading) or _s_t_d_o_u_t
547
(for writing) is used.
549
2. If the first character of the file name is `|', the remainder of the
550
argument is interpreted as a shell command. FFttpp then forks a shell,
551
using popen(3) with the argument supplied, and reads (writes) from
552
the stdout (stdin). If the shell command includes spaces, the argu-
553
ment must be quoted; e.g. ``" ls -lt"''. A particularly useful
554
example of this mechanism is: ``dir more''.
556
3. Failing the above checks, if ``globbing'' is enabled, local file
557
names are expanded according to the rules used in the csh(1); c.f.
558
the gglloobb command. If the ffttpp command expects a single local file
559
(.e.g. ppuutt), only the first filename generated by the "globbing"
562
4. For mmggeett commands and ggeett commands with unspecified local file
563
names, the local filename is the remote filename, which may be
564
altered by a ccaassee, nnttrraannss, or nnmmaapp setting. The resulting filename
565
may then be altered if rruunniiqquuee is on.
567
5. For mmppuutt commands and ppuutt commands with unspecified remote file
568
names, the remote filename is the local filename, which may be
569
altered by a nnttrraannss or nnmmaapp setting. The resulting filename may
570
then be altered by the remote server if ssuunniiqquuee is on.
572
FFIILLEE TTRRAANNSSFFEERR PPAARRAAMMEETTEERRSS
573
The FTP specification specifies many parameters which may affect a file
574
transfer. The ttyyppee may be one of ``ascii'', ``image'' (binary),
575
``ebcdic'', and ``local byte size'' (for PDP-10's and PDP-20's mostly).
576
FFttpp supports the ascii and image types of file transfer, plus local byte
577
size 8 for tteenneexx mode transfers.
579
FFttpp supports only the default values for the remaining file transfer
580
parameters: mmooddee, ffoorrmm, and ssttrruucctt.
582
TTHHEE ..nneettrrcc FFIILLEE
583
The _._n_e_t_r_c file contains login and initialization information used by the
584
auto-login process. It resides in the user's home directory. The fol-
585
lowing tokens are recognized; they may be separated by spaces, tabs, or
588
mmaacchhiinnee _n_a_m_e
589
Identify a remote machine _n_a_m_e. The auto-login process
590
searches the _._n_e_t_r_c file for a mmaacchhiinnee token that matches the
591
remote machine specified on the ffttpp command line or as an ooppeenn
592
command argument. Once a match is made, the subsequent _._n_e_t_r_c
593
tokens are processed, stopping when the end of file is reached
594
or another mmaacchhiinnee or a ddeeffaauulltt token is encountered.
596
ddeeffaauulltt This is the same as mmaacchhiinnee _n_a_m_e except that ddeeffaauulltt matches
597
any name. There can be only one ddeeffaauulltt token, and it must be
598
after all mmaacchhiinnee tokens. This is normally used as:
600
default login anonymous password user@site
602
thereby giving the user _a_u_t_o_m_a_t_i_c anonymous ftp login to
603
machines not specified in _._n_e_t_r_c. This can be overridden by
604
using the --nn flag to disable auto-login.
607
Identify a user on the remote machine. If this token is
608
present, the auto-login process will initiate a login using the
611
ppaasssswwoorrdd _s_t_r_i_n_g
612
Supply a password. If this token is present, the auto-login
613
process will supply the specified string if the remote server
614
requires a password as part of the login process. Note that if
615
this token is present in the _._n_e_t_r_c file for any user other
616
than _a_n_o_n_y_m_o_u_s, ffttpp will abort the auto-login process if the
617
_._n_e_t_r_c is readable by anyone besides the user.
619
aaccccoouunntt _s_t_r_i_n_g
620
Supply an additional account password. If this token is
621
present, the auto-login process will supply the specified
622
string if the remote server requires an additional account
623
password, or the auto-login process will initiate an ACCT com-
626
mmaaccddeeff _n_a_m_e
627
Define a macro. This token functions like the ffttpp mmaaccddeeff com-
628
mand functions. A macro is defined with the specified name;
629
its contents begin with the next _._n_e_t_r_c line and continue until
630
a null line (consecutive new-line characters) is encountered.
631
If a macro named iinniitt is defined, it is automatically executed
632
as the last step in the auto-login process.
634
EENNVVIIRROONNMMEENNTT
635
FFttpp uses the following environment variables.
637
HOME For default location of a _._n_e_t_r_c file, if one exists.
639
SHELL For default shell.
647
The ffttpp command appeared in 4.2BSD.
650
Correct execution of many commands depends upon proper behavior by the
653
An error in the treatment of carriage returns in the 4.2BSD ascii-mode
654
transfer code has been corrected. This correction may result in incor-
655
rect transfers of binary files to and from 4.2BSD servers using the ascii
656
type. Avoid this problem by using the binary image type.
658
4.2 Berkeley Distribution March 23, 2006 4.2 Berkeley Distribution