Penguin
Annotated edit history of ncftpget(1) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 ncftpget
2 !!!ncftpget
3 NAME
4 SYNOPSIS
5 OPTIONS
6 DESCRIPTION
7 DIAGNOSTICS
8 AUTHOR
9 SEE ALSO
10 ----
11 !!NAME
12
13
14 ncftpget - Internet file transfer program for scripts
15 !!SYNOPSIS
16
17
18 __ncftpget__ [[''options''] ''remote-host
19 local-directory remote-files...''
20
21
22 __ncftpget__ -f login.cfg [[''options'']
23 ''local-directory remote-files...''
24
25
26 __ncftpget__ [[''options'']
27 ''ftp://url.style.host/path/name''
28
29
30 __ncftpget__ -c [[''options''] ''remote-host
31 remote-file'' ''
32
33
34 __ncftpget__ -c [[''options'']
35 ''ftp://url.style.host/path/name''
36 ''
37 !!OPTIONS
38
39
40 __Command line flags:__
41
42
43 __-u__ ''XX''
44
45
46 Use username ''XX'' instead of anonymous.
47
48
49 __-p__ ''XX''
50
51
52 Use password ''XX'' with the username.
53
54
55 __-P__ ''XX''
56
57
58 Use port number ''XX'' instead of the default FTP service
59 port (21).
60
61
62 __-j__ ''XX''
63
64
65 Use account ''XX'' in supplement to the username and
66 password (deprecated).
67
68
69 __-d__ ''XX''
70
71
72 Use the file ''XX'' for debug logging.
73
74
75 __-a__
76
77
78 Use ASCII transfer type instead of binary.
79
80
81 __-t__ ''XX''
82
83
84 Timeout after ''XX'' seconds.
85
86
87 __-v__/__-V__
88
89
90 Do (do not) use progress meters. The default is to use
91 progress meters if the output stream is a TTY.
92
93
94 __-f__ ''XX''
95
96
97 Read the file ''XX'' for host, user, and password
98 information.
99
100
101 __-c__
102
103
104 Send output to standard out, rather than writing to a local
105 file.
106
107
108 __-A__
109
110
111 Append to local files, instead of overwriting
112 them.
113
114
115 __-z__/__-Z__
116
117
118 Do (do not) try to resume transfers. The default is to try
119 to resume (-z).
120
121
122 __-E__
123
124
125 Use regular (PORT) data connections.
126
127
128 __-F__
129
130
131 Use passive (PASV) data connections. The default is to use
132 passive, but to fallback to regular if the passive
133 connection fails or times out.
134
135
136 __-DD__
137
138
139 Delete remote file after successfully downloading
140 it.
141
142
143 __-R__
144
145
146 Recursive mode; copy whole directory trees.
147
148
149 __-T__
150
151
152 Do not use automatic on-the-fly TAR mode for downloading
153 whole directory trees. ''ncftpget'' uses TAR whenever
154 possible since this usually preserves symbolic links and
155 file permissions. TAR mode can also result in faster
156 transfers for directories containing many small files, since
157 a single data connection can be used rather than an FTP data
158 connection for each small file. The downside to using TAR is
159 that it forces downloading of the whole directory, even if
160 you had previously downloaded a portion of it earlier, so
161 you may want to use this option if you want to resume
162 downloading of a directory.
163
164
165 __-r__ ''XX''
166
167
168 Redial a maximum of ''XX'' times until connected to the
169 remote FTP server.
170
171
172 __-b__
173
174
175 Run in background (by submitting a batch job and then
176 spawning ''ncftpbatch'').
177
178
179 __-bb__
180
181
182 Similar to __-b__ option, but only submits the batch job.
183 You will need to run ''ncftpbatch'' for the batch job to
184 be processed. This is useful if you already have a
185 ''ncftpbatch'' process running, or wish to have better
186 control of when batch jobs are processed.
187
188
189 For example, if you wanted to do background processing of
190 three files all on the same remote server, it is more polite
191 to use just one ''ncftpbatch'' process to process the
192 three jobs sequentially, rather than having three
193 ''ncftpbatch'' processes open three simultaneous FTP
194 sessions to the same server.
195
196
197 __-B__ ''XX''
198
199
200 Try setting the TCP/IP socket buffer size to ''XX''
201 bytes.
202
203
204 __-W__ ''XX''
205
206
207 Send raw FTP command ''XX'' after logging
208 in.
209
210
211 __-X__ ''XX''
212
213
214 Send raw FTP command ''XX'' after each file
215 transferred.
216
217
218 __-Y__ ''XX''
219
220
221 Send raw FTP command ''XX'' before logging
222 out.
223
224
225 The __-W__, __-X__, and __-Y__ options are useful
226 for advanced users who need to tweak behavior on some
227 servers. For example, users accessing mainframes might need
228 to send some special SITE commands to set blocksize and
229 record format information.
230
231
232 For these options, you can use them multiple times each if
233 you need to send multiple commands. For the __-X__
234 option, you can use the cookie __%s__ to expand into the
235 name of the file that was transferred.
236 !!DESCRIPTION
237
238
239 The purpose of ''ncftpget'' is to do file transfers from
240 the command-line without entering an interactive shell. This
241 lets you write shell scripts or other unattended processes
242 that can do FTP. It is also useful for advanced users who
243 want to retrieve files from the shell command line without
244 entering an interactive FTP program such as
245 ''ncftp''.
246
247
248 One particularly useful feature of this program is that you
249 can give it a ''uniform resource locator'' as the only
250 argument and the program will download that file. You can
251 then copy and paste from your web browser or newsreader and
252 use that URL. Example:
253
254
255 $ cd /tmp
256 $ ncftpget ftp://ftp.ncftp.com/pub/ncftp/ncftp.tar.Z
257 $ zcat ncftp.tar.Z | tar xf -
258
259
260 By default the program tries to open the remote host and
261 login anonymously, but you can specify a username and
262 password information. The __-u__ option is used to
263 specify the username to login as, and the __-p__ option
264 is used to specify the password. If you are running the
265 program from the shell, you may omit the __-p__ option
266 and the program will prompt you for the
267 password.
268
269
270 Using the __-u__ and __-p__ options are not
271 recommended, because your account information is exposed to
272 anyone who can see your shell script or your process
273 information. For example, someone using the ''ps''
274 program could see your password while the program
275 runs.
276
277
278 You may use the __-f__ option instead to specify a file
279 with the account information. However, this is still not
280 secure because anyone who has read access to the information
281 file can see the account information. Nevertheless, if you
282 choose to use the __-f__ option the file should look
283 something like this:
284
285
286 host sphygmomanometer.ncftp.com
287 user gleason
288 pass mypasswd
289
290
291 Don't forget to change the permissions on this file so no
292 one else can read them.
293
294
295 The __-d__ option is very useful when you are trying to
296 diagnose why a file transfer is failing. It prints out the
297 entire FTP conversation to the file you specify, so you can
298 get an idea of what went wrong. If you specify the special
299 name ''stdout'' as the name of the debugging output file,
300 the output will instead print to the screen.
301 Example:
302
303
304 $ ncftpget -d stdout bowser.nintendo.co.jp . /pub/README
305 220: FTP server ready.
306 Connected to bowser.nintendo.co.jp.
307 Cmd: USER anonymous
308 331: Guest login ok, send your complete e-mail address as
309 password.
310 Cmd: PASS xxxxxxxx
311 230: Welcome!
312 Logged in to bowser.nintendo.co.jp as anonymous.
313 Cmd: TYPE I
314 200: Type set to I.
315 Cmd: PORT 192,168,9,37,6,76
316 200: PORT command successful.
317 Cmd: RETR /pub/README
318 550: /pub/README: File in use.
319 Cmd: QUIT
320 221: Goodbye.
321
322
323 Using ASCII mode is helpful when the text format of your
324 host differs from that of the remote host. For example, if
325 you are retrieving a .TXT file from a Windows-based host to
326 a UNIX system, you could use the __-a__ flag which would
327 use ASCII transfer mode so that the file created on the UNIX
328 system would be in the UNIX text format instead of the
329 MS-DOS text format.
330
331
332 You can retrieve an entire directory tree of files by using
333 the __-R__ flag. However, this will work only if the
334 remote FTP server is a UNIX server, or emulates UNIX's list
335 output. Example:
336
337
338 $ ncftpget -R ftp.ncftp.com /tmp /pub/ncftp
339
340
341 This would create a /tmp/ncftp hierarchy.
342 !!DIAGNOSTICS
343
344
345 ''ncftpget'' returns the following exit
346 values:
347
348
349 0
350
351
352 Success.
353
354
355 1
356
357
358 Could not connect to remote host.
359
360
361 2
362
363
364 Could not connect to remote host - timed out.
365
366
367 3
368
369
370 Transfer failed.
371
372
373 4
374
375
376 Transfer failed - timed out.
377
378
379 5
380
381
382 Directory change failed.
383
384
385 6
386
387
388 Directory change failed - timed out.
389
390
391 7
392
393
394 Malformed URL.
395
396
397 8
398
399
400 Usage error.
401
402
403 9
404
405
406 Error in login configuration file.
407
408
409 10
410
411
412 Library initialization failed.
413
414
415 11
416
417
418 Session initialization failed.
419 !!AUTHOR
420
421
422 Mike Gleason, NcFTP Software
423 (mgleason@ncftp.com).
424 !!SEE ALSO
425
426
427 ncftpput(1), ncftp(1), ftp(1),
428 rcp(1), tftp(1).
429
430
431 ''LibNcFTP''
432 (http://www.ncftp.com/libncftp/).
433 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.