| 1 |
<HTML> |
| 2 |
<HEAD> |
| 3 |
<TITLE>ncftp(1) manual page</TITLE> |
| 4 |
</HEAD> |
| 5 |
<BODY bgcolor=white> |
| 6 |
<p align="right"> |
| 7 |
<A HREF="#toc">Table of Contents</A><P> |
| 8 |
|
| 9 |
<H2><A NAME="sect0" HREF="#toc0">Name</A></H2> |
| 10 |
<UL> |
| 11 |
<b>NcFTP</b> - Browser |
| 12 |
program for the File Transfer Protocol |
| 13 |
</UL> |
| 14 |
<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2> |
| 15 |
<UL> |
| 16 |
<P> |
| 17 |
<B>ncftp</B> [<I>host</I>]<I></I> <P> |
| 18 |
<B>ncftp</B> [<I>ftp://host.name/directory/</I>] |
| 19 |
|
| 20 |
</UL> |
| 21 |
|
| 22 |
<H2><A NAME="sect2" HREF="#toc2">Description</A></H2> |
| 23 |
<P> |
| 24 |
The purpose of <I>ncftp</I> is to provide a powerful and flexible |
| 25 |
interface to the Internet standard <I>File Transfer Protocol</I>. It is intended |
| 26 |
to replace the stock <I>ftp</I> program that comes with the system. <P> |
| 27 |
Although the |
| 28 |
program appears to be rather spartan, you'll find that <I>ncftp</I> has a wealth |
| 29 |
of valuable performance and usage features. The program was designed with |
| 30 |
an emphasis on usability, and it does as much as it can for you automatically |
| 31 |
so you can do what you expect to do with a file transfer program, which |
| 32 |
is transfer files between two interconnected systems. <P> |
| 33 |
Some of the cooler |
| 34 |
features include progress meters, filename completion, command-line editing, |
| 35 |
background processing, auto-resume downloads, bookmarking, cached directory |
| 36 |
listings, host redialing, working with firewalls and proxies, downloading |
| 37 |
entire directory trees, etc., etc. <P> |
| 38 |
The <I>ncftp</I> distribution comes with the |
| 39 |
useful utility programs <I><I>ncftpget</I>(1)</I> and <I><I>ncftpput</I>(1)</I> which were designed |
| 40 |
to do command-line FTP. In particular, they are very handy for shell scripts. |
| 41 |
This version of <I>ncftp</I> no longer does command-line FTP, since the main <I>ncftp</I> |
| 42 |
program is more of a browser-type program.</P> |
| 43 |
|
| 44 |
<center> |
| 45 |
<p> |
| 46 |
<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> |
| 47 |
<input type="hidden" name="cmd" value="_s-xclick"> |
| 48 |
<input type="hidden" name="hosted_button_id" value="5JS76LUNSD3HU"> |
| 49 |
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> |
| 50 |
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"> |
| 51 |
</form> |
| 52 |
</center> |
| 53 |
|
| 54 |
|
| 55 |
<H3><A NAME="sect2a" HREF="#toc2a">Options</A></H3> |
| 56 |
<P> |
| 57 |
The program allows you to specify a host or directory URL |
| 58 |
on the command line. This is a synonym for running ncftp |
| 59 |
and then using the open command. A few command-line flags |
| 60 |
are allowed with this mode: |
| 61 |
<UL> |
| 62 |
<table width=100%> |
| 63 |
<tr> |
| 64 |
<td width=50><B>-u</B> <I>XX</I></td> |
| 65 |
<td>Use username <I>XX</I> instead of anonymous.</td> |
| 66 |
</tr> |
| 67 |
<tr> |
| 68 |
<td width=50><B>-p</B> <I>XX</I></td> |
| 69 |
<td>Use password <I>XX</I> with the username.</td> |
| 70 |
</tr> |
| 71 |
<tr> |
| 72 |
<td width=50><B>-j</B> <I>XX</I></td> |
| 73 |
<td>Use account <I>XX</I> in supplement to the username and password (deprecated)</td> |
| 74 |
</tr> |
| 75 |
<tr> |
| 76 |
<td width=50><B>-P</B> <I>XX</I></td> |
| 77 |
<td>Use port number <I>XX</I> instead of the default FTP service port (21).</td> |
| 78 |
</tr> |
| 79 |
</table> |
| 80 |
</UL> |
| 81 |
</P> |
| 82 |
|
| 83 |
<H3><A NAME="sect3" HREF="#toc3">Introduction to the Command Shell</A></H3> |
| 84 |
|
| 85 |
<P> |
| 86 |
Upon running the program you are presented a command prompt where you type |
| 87 |
commands to the program's shell. Usually you will want to open a remote filesystem |
| 88 |
to transfer files to and from your local machine's filesystem. To do that, |
| 89 |
you need to know the symbolic name of the remote system, or its <I>Internet |
| 90 |
Protocol</I> (IP) address. For example, a symbolic name might be ``typhoon.unl.edu,'' |
| 91 |
and its IP address could be ``129.93.33.24.'' To open a connection to that system, |
| 92 |
you use the program's <I>open</I> command: |
| 93 |
<UL> |
| 94 |
<PRE>open typhoon.unl.edu |
| 95 |
open 129.93.33.24</PRE> |
| 96 |
</UL> |
| 97 |
<P> |
| 98 |
Both of these try to open the machine called typhoon at the <I>University |
| 99 |
of Nebraska</I>. Using the symbolic name is the preferred way, because IP addresses |
| 100 |
may change without notice, while the symbolic names usually stay the same. |
| 101 |
<P> |
| 102 |
When you open a remote filesystem, you need to have permission. The <I>FTP |
| 103 |
Protocol</I>'s authentication system is very similar to that of logging in to |
| 104 |
your account. You have to give an account name, and its password for access |
| 105 |
to that account's files. However, most remote systems that have anything |
| 106 |
you might be interested in don't require an account name for use. You can |
| 107 |
often get anonymous access to a remote filesystem and exchange files that |
| 108 |
have been made publicly accessible. The program attempts to get anonymous |
| 109 |
permission to a remote system by default. What actually happens is that |
| 110 |
the program tries to use ``anonymous'' as the account name, and when prompted |
| 111 |
for a password, uses your E-mail address as a courtesy to the remote system's |
| 112 |
maintainer. You can have the program try to use a specific account also. |
| 113 |
That will be explained later. <P> |
| 114 |
After the <I>open</I> command completes successfully, |
| 115 |
you are connected to the remote system and logged in. You should now see |
| 116 |
the command prompt change to reflect the name of the current remote directory. |
| 117 |
To see what's in the current remote directory, you can use the program's |
| 118 |
<I>ls</I> and <I>dir</I> commands. The former is terse, preferring more remote files |
| 119 |
in less screen space, and the latter is more verbose, giving detailed information |
| 120 |
about each item in the directory. <P> |
| 121 |
You can use the program's <I>cd</I> command to |
| 122 |
move to other directories on the remote system. The cd command behaves very |
| 123 |
much like the command of the same name in the <I>Bourne</I> and <I>Korn</I> shell. <P> |
| 124 |
The |
| 125 |
purpose of the program is to exchange data with other systems. You can use |
| 126 |
the program's <I>get</I> command to copy a file from the remote system to your |
| 127 |
local system: |
| 128 |
<UL> |
| 129 |
<PRE>get README.txt</PRE> |
| 130 |
</UL> |
| 131 |
<P> |
| 132 |
The program will display the progress of the transfer on the screen, |
| 133 |
so you can tell how much needs to be done before the transfer finishes. |
| 134 |
When the transfer does finish, then you can enter more commands to the |
| 135 |
program's command shell. <P> |
| 136 |
You can use the program's <I>put</I> command to copy a file |
| 137 |
from your system to the remote system: |
| 138 |
<UL> |
| 139 |
<PRE>put something.tar</PRE> |
| 140 |
</UL> |
| 141 |
<P> |
| 142 |
When you are finished using the remote system, you can open another one |
| 143 |
or use the <I>quit</I> <P> |
| 144 |
Before quitting, you may want to save the current FTP session's |
| 145 |
settings for later. You can use the <I>bookmark</I> command to save an entry into |
| 146 |
your $HOME/.ncftp/bookmarks file. When you use the <I>bookmark</I> command, you |
| 147 |
also specify a bookmark name, so the next time instead of opening the full |
| 148 |
hostname you can use the name of the bookmark. A bookmark acts just like |
| 149 |
one for your web browser, so it saves the remote directory you were in, |
| 150 |
the account name you used, etc., and other information it learned so that |
| 151 |
the next time you use the bookmark it should require as little effort from |
| 152 |
you as possible. <P> |
| 153 |
|
| 154 |
<H3><A NAME="sect4" HREF="#toc4">Command Reference</A></H3> |
| 155 |
|
| 156 |
<pre>help</pre> |
| 157 |
|
| 158 |
<DL> |
| 159 |
|
| 160 |
<DD>The first command to know is <I>help</I>. |
| 161 |
If you just type</DD> |
| 162 |
|
| 163 |
</DL> |
| 164 |
|
| 165 |
<UL> |
| 166 |
<UL> |
| 167 |
<pre>help</pre> |
| 168 |
</UL> |
| 169 |
</UL> |
| 170 |
|
| 171 |
<DL> |
| 172 |
|
| 173 |
<UL> |
| 174 |
|
| 175 |
<DT> from the command shell, the program prints the names of all of the |
| 176 |
supported commands. From there, you can get specific help for a command |
| 177 |
by typing the command after, for example: </DT> |
| 178 |
</UL> |
| 179 |
</DL> |
| 180 |
|
| 181 |
<UL> |
| 182 |
<UL> |
| 183 |
<pre>help open</pre> |
| 184 |
</UL> |
| 185 |
</UL> |
| 186 |
|
| 187 |
<DL> |
| 188 |
|
| 189 |
<UL> |
| 190 |
|
| 191 |
</UL> |
| 192 |
|
| 193 |
<ul> prints information about the <i>open</i> command. </ul> |
| 194 |
|
| 195 |
<dd> </dd> |
| 196 |
</DL> |
| 197 |
|
| 198 |
<pre>ascii</pre> |
| 199 |
|
| 200 |
<DL> |
| 201 |
|
| 202 |
<DD> This command |
| 203 |
sets the transfer type to ASCII text. This is useful for text-only transfers |
| 204 |
because the concept of text files differs between operating systems. For |
| 205 |
example on UNIX, a text file denotes line breaks with the linefeed character, |
| 206 |
while on MS-DOS a line break is denoted by both a carriage return character |
| 207 |
and a line feed character. Therefore, for data transfers that you consider |
| 208 |
the data as text you can use <I>ascii</I> to ensure that both the remote system |
| 209 |
and local system translate accordingly. The default transfer type that <I>ncftp</I> |
| 210 |
uses is not ASCII, but straight binary. </DD> |
| 211 |
|
| 212 |
<dt> </dt> |
| 213 |
</DL> |
| 214 |
|
| 215 |
<pre>bgget, bgput</pre> |
| 216 |
|
| 217 |
<DL> |
| 218 |
|
| 219 |
<DD> These commands |
| 220 |
correspond to the <I>get</I> and <I>put</I> commands explained below, except that they |
| 221 |
do the job in the background. Normally when you do a <I>get</I> then the program |
| 222 |
does the download immediately, and does not return control to you until |
| 223 |
the download completes. The background transfers are nice because you can |
| 224 |
continue browsing the remote filesystem and even open other systems. In |
| 225 |
fact, they are done by a daemon process, so even if you log off your UNIX |
| 226 |
host the daemon should still do your transfers. The daemon will also automatically |
| 227 |
continue to retry the transfers until they finish. To tell when background |
| 228 |
jobs have finished, you have to examine the <I>$HOME/.ncftp/spool/log</I> file, |
| 229 |
or run the <I>jobs</I> command from within <I>NcFTP</I>. </DD> |
| 230 |
|
| 231 |
<dt> </dt> |
| 232 |
<DD>Both the <I>bgget</I> and <I>bgput</I> commands |
| 233 |
allow you to schedule when to do the transfers. They take a ``-@'' parameter, |
| 234 |
whose argument is a date of the form YYYYMMDDhhmmss (four digit year, month, |
| 235 |
day, hour, minute, second). For example, to schedule a download at 3 AM |
| 236 |
on November 6, you could try:</DD> |
| 237 |
|
| 238 |
</DL> |
| 239 |
|
| 240 |
<UL> |
| 241 |
<UL> |
| 242 |
<pre>bgget -@ 19971106030000 /pub/idstuff/quake/q2_100.zip</pre> |
| 243 |
<pre> </pre> |
| 244 |
</UL> |
| 245 |
</UL> |
| 246 |
<pre>bgstart</pre> |
| 247 |
|
| 248 |
<DL> |
| 249 |
|
| 250 |
<DD> This command |
| 251 |
tells <I>ncftp</I> to immediately start the background transfers you've requested, |
| 252 |
which simply runs a copy of the <I>ncftpbatch</I> program which is responsible |
| 253 |
for the background jobs. Normally the program will start the background |
| 254 |
job as soon as you close the current site, open a new site, or quit the |
| 255 |
program. The reason for this is because since so many users still use slow |
| 256 |
dialup links that starting the transfers would slow things to a crawl, |
| 257 |
making it difficult to browse the remote system. An added bonus of starting |
| 258 |
the background job when you close the site is that <I>ncftp</I> can pass off that |
| 259 |
open connection to the <I>ncftpbatch</I> program. That is nice when the site is |
| 260 |
always busy, so that the background job doesn't have to wait and get re-logged |
| 261 |
on to do its job. </DD> |
| 262 |
|
| 263 |
<DT> </DT> |
| 264 |
</DL> |
| 265 |
|
| 266 |
<pre>binary</pre> |
| 267 |
|
| 268 |
<DL> |
| 269 |
|
| 270 |
<DD> Sets the transfer type to raw binary, so that |
| 271 |
no translation is done on the data transferred. This is the default anyway, |
| 272 |
since most files are in binary. </DD> |
| 273 |
|
| 274 |
<dt> </dt> |
| 275 |
</DL> |
| 276 |
|
| 277 |
<pre>bookmark</pre> |
| 278 |
|
| 279 |
<DL> |
| 280 |
|
| 281 |
<DD> Saves the current session settings |
| 282 |
for later use. This is useful to save the remote system and remote working |
| 283 |
directory so you can quickly resume where you left off some other time. |
| 284 |
The bookmark data is stored in your <I>$HOME/.ncftp/bookmarks</I> file. </DD> |
| 285 |
|
| 286 |
<dt> </dt> |
| 287 |
</DL> |
| 288 |
|
| 289 |
<pre>bookmarks</pre> |
| 290 |
|
| 291 |
<DL> |
| 292 |
|
| 293 |
<DD> |
| 294 |
Lists the contents of your <I>$HOME/.ncftp/bookmarks</I> file in a human-readable |
| 295 |
format. You can use this command to recall the bookmark name of a previously |
| 296 |
saved bookmark, so that you can use the <I>open</I> command with it. </DD> |
| 297 |
|
| 298 |
<dt> </dt> |
| 299 |
</DL> |
| 300 |
|
| 301 |
<pre>cat</pre> |
| 302 |
|
| 303 |
<DL> |
| 304 |
|
| 305 |
<DD> Acts |
| 306 |
like the ``/bin/cat'' <I>UNIX</I> command, only for remote files. This downloads the |
| 307 |
file you specify and dumps it directly to the screen. You will probably |
| 308 |
find the <I>page</I> command more useful, since that lets you view the file one |
| 309 |
screen at a time instead of printing the entire file at once. </DD> |
| 310 |
|
| 311 |
<dt> </dt> |
| 312 |
</DL> |
| 313 |
|
| 314 |
<pre>cd</pre> |
| 315 |
|
| 316 |
<DL> |
| 317 |
|
| 318 |
<DD> Changes |
| 319 |
the working directory on the remote host. Use this command to move to different |
| 320 |
areas on the remote server. If you just opened a new site, you might be |
| 321 |
in the root directory. Perhaps there was a directory called ``/pub/news/comp.sources.d'' |
| 322 |
that someone told you about. From the root directory, you could:</DD> |
| 323 |
|
| 324 |
</DL> |
| 325 |
|
| 326 |
<UL> |
| 327 |
<UL> |
| 328 |
<pre>cd pub |
| 329 |
cd news |
| 330 |
cd comp.sources.d</pre> |
| 331 |
</UL> |
| 332 |
</UL> |
| 333 |
|
| 334 |
<DL> |
| 335 |
|
| 336 |
<UL> |
| 337 |
|
| 338 |
<DT> or, more concisely, </DT> |
| 339 |
</UL> |
| 340 |
</DL> |
| 341 |
|
| 342 |
<UL> |
| 343 |
<UL> |
| 344 |
<pre>cd /pub/news/comp.sources.d</pre> |
| 345 |
</UL> |
| 346 |
</UL> |
| 347 |
|
| 348 |
<DL> |
| 349 |
|
| 350 |
<UL> |
| 351 |
|
| 352 |
</UL> |
| 353 |
<DD> Then, commands such as <I>get</I>, <I>put</I>, and <I>ls</I> could |
| 354 |
be used to refer to items in that directory. Some shells in the <I>UNIX</I> environment |
| 355 |
have a feature I like, which is switching to the previous directory. Like |
| 356 |
those shells, you can do:</DD> |
| 357 |
|
| 358 |
</DL> |
| 359 |
|
| 360 |
<UL> |
| 361 |
<UL> |
| 362 |
<pre>cd -</pre> |
| 363 |
</UL> |
| 364 |
<p> to change to the last directory you were in.</p> |
| 365 |
</UL> |
| 366 |
<pre> </pre> |
| 367 |
<pre>chmod</pre> |
| 368 |
|
| 369 |
<DL> |
| 370 |
|
| 371 |
<DD> Acts like the |
| 372 |
``/bin/chmod'' <I>UNIX</I> command, only for remote files. However, this is not a standard |
| 373 |
command, so remote FTP servers may not support it. </DD> |
| 374 |
|
| 375 |
<dt> </dt> |
| 376 |
</DL> |
| 377 |
|
| 378 |
<pre>close</pre> |
| 379 |
|
| 380 |
<DL> |
| 381 |
|
| 382 |
<DD> Disconnects you |
| 383 |
from the remote server. The program does this for you automatically when |
| 384 |
needed, so you can simply open other sites or quit the program without |
| 385 |
worrying about closing the connection by hand. </DD> |
| 386 |
|
| 387 |
<dt> </dt> |
| 388 |
</DL> |
| 389 |
|
| 390 |
<pre>debug</pre> |
| 391 |
|
| 392 |
<DL> |
| 393 |
|
| 394 |
<DD> This command is mostly |
| 395 |
for internal testing. You could type</DD> |
| 396 |
|
| 397 |
</DL> |
| 398 |
|
| 399 |
<UL> |
| 400 |
<UL> |
| 401 |
<pre>debug 1</pre> |
| 402 |
</UL> |
| 403 |
</UL> |
| 404 |
|
| 405 |
<DL> |
| 406 |
|
| 407 |
<UL> |
| 408 |
|
| 409 |
</UL> |
| 410 |
<DD> to turn debugging mode on. Then you could see all messages between |
| 411 |
the program and the remote server, and things that are only printed in |
| 412 |
debugging mode. However, this information is also available in the <I>$HOME/.ncftp/trace</I> |
| 413 |
file, which is created each time you run <I>ncftp</I>. If you need to report a |
| 414 |
bug, send a <I>trace</I> file if you can. </DD> |
| 415 |
|
| 416 |
<dt> </dt> |
| 417 |
</DL> |
| 418 |
|
| 419 |
<pre>dir</pre> |
| 420 |
|
| 421 |
<DL> |
| 422 |
|
| 423 |
<DD> Prints a detailed directory listing. |
| 424 |
It tries to behave like <I>UNIX</I>'s ``/bin/ls -l'' command. If the remote server seems |
| 425 |
to be a <I>UNIX</I> host, you can also use the same flags you would with <I>ls</I>, for |
| 426 |
instance</DD> |
| 427 |
|
| 428 |
</DL> |
| 429 |
|
| 430 |
<UL> |
| 431 |
<UL> |
| 432 |
<pre>dir -rt</pre> |
| 433 |
</UL> |
| 434 |
</UL> |
| 435 |
|
| 436 |
<DL> |
| 437 |
|
| 438 |
<UL> |
| 439 |
|
| 440 |
<DT> would try to act like </DT> |
| 441 |
</UL> |
| 442 |
</DL> |
| 443 |
|
| 444 |
<UL> |
| 445 |
<UL> |
| 446 |
<pre>/bin/ls -lrt</pre> |
| 447 |
</UL> |
| 448 |
<p>would on <i>UNIX</i>.</p> |
| 449 |
<p> </p> |
| 450 |
</UL> |
| 451 |
|
| 452 |
</DL> |
| 453 |
|
| 454 |
<pre>edit</pre> |
| 455 |
|
| 456 |
<DL> |
| 457 |
|
| 458 |
<DD> Downloads into a temporary file for editing on the local host, |
| 459 |
then uploads the changed file back to the remote host. </DD> |
| 460 |
|
| 461 |
<dt> </dt> |
| 462 |
</DL> |
| 463 |
|
| 464 |
<pre>get</pre> |
| 465 |
|
| 466 |
<DL> |
| 467 |
|
| 468 |
<DD> Copies files from the current working |
| 469 |
directory on the remote host to your machine's current working directory. |
| 470 |
To place a copy of ``README'' and ``README.too'' in your local directory, you could |
| 471 |
try:</DD> |
| 472 |
|
| 473 |
</DL> |
| 474 |
|
| 475 |
<UL> |
| 476 |
<UL> |
| 477 |
<p> get README README.too</p> |
| 478 |
</UL> |
| 479 |
</UL> |
| 480 |
|
| 481 |
<DL> |
| 482 |
|
| 483 |
<UL> |
| 484 |
|
| 485 |
<DT> You could also accomplish that by using a wildcard |
| 486 |
expression, such as: </DT> |
| 487 |
</UL> |
| 488 |
</DL> |
| 489 |
|
| 490 |
<UL> |
| 491 |
<UL> |
| 492 |
<pre>get README*</pre> |
| 493 |
</UL> |
| 494 |
</UL> |
| 495 |
|
| 496 |
<DL> |
| 497 |
|
| 498 |
<DD> This command is similar to the behavior of other FTP programs' <I>mget</I> command. To retrieve a remote file but give it a different name on |
| 499 |
your host, you can use the ``-z'' flag. This example shows how to download a |
| 500 |
file called <I>ReadMe.txt</I> but name it locally as <I>README</I>:</DD> |
| 501 |
|
| 502 |
</DL> |
| 503 |
|
| 504 |
<UL> |
| 505 |
<UL> |
| 506 |
<pre>get -z ReadMe.txt README</pre> |
| 507 |
</UL> |
| 508 |
</UL> |
| 509 |
|
| 510 |
<DL> |
| 511 |
|
| 512 |
<DD> The program tries to ``resume'' downloads by default. This means that if the remote FTP server lost the connection and was only |
| 513 |
able to send 490 kilobytes of a 500 kilobyte file, you could reconnect |
| 514 |
to the FTP server and do another <I>get</I> on the same file name and it would |
| 515 |
get the last 10 kilobytes, instead of retrieving the entire file again. |
| 516 |
There are some occasions where you may not want that behavior. To turn it |
| 517 |
off you can use the ``-f'' flag. </DD> |
| 518 |
|
| 519 |
<DT> </DT> |
| 520 |
<DD>There are also times where you want to append |
| 521 |
to an existing file. You can do this by using the ``-A'' flag, for example</DD> |
| 522 |
|
| 523 |
</DL> |
| 524 |
|
| 525 |
<UL> |
| 526 |
<UL> |
| 527 |
<pre>get -A log.11</pre> |
| 528 |
</UL> |
| 529 |
</UL> |
| 530 |
|
| 531 |
<DL> |
| 532 |
|
| 533 |
<UL> |
| 534 |
|
| 535 |
</UL> |
| 536 |
|
| 537 |
<ul><P>would append to a file named ``log.11'' if it existed locally. |
| 538 |
|
| 539 |
<p>Another thing you can do is delete a remote file after you download it. |
| 540 |
This can be useful when a remote host expects a file to be removed when |
| 541 |
it has been retrieved. Use the double-D flag, such as ``get -DD'' to do this. </ul> |
| 542 |
|
| 543 |
<DT> |
| 544 |
</DT> |
| 545 |
<DD>The <I>get</I> command lets you retrieve entire directory trees, too. Although it may |
| 546 |
not work with some remote systems, you can try ``get -R'' with a directory to |
| 547 |
download the directory and its contents. </DD> |
| 548 |
|
| 549 |
<dt> </dt> |
| 550 |
|
| 551 |
<DD>When using the ``-R'' flag, you can also use the ``-T'' flag to disable |
| 552 |
automatic on-the-fly TAR mode for downloading whole directory trees. |
| 553 |
The program uses TAR whenever possible since this usually preserves symbolic links |
| 554 |
and file permissions. TAR mode can also result in faster transfers for directories containing many |
| 555 |
small files, since a single data connection can be used rather than an FTP |
| 556 |
data connection for each small file. The downside to using TAR is that it forces downloading of the whole directory, |
| 557 |
even if you had previously downloaded a portion of it earlier, so you may want to use this option if you want to resume downloading of a directory. </DD> |
| 558 |
<dt> </dt> |
| 559 |
|
| 560 |
</DL> |
| 561 |
|
| 562 |
<pre>jobs</pre> |
| 563 |
|
| 564 |
<DL> |
| 565 |
|
| 566 |
<DD> Views the list of currently |
| 567 |
executing <I>NcFTP</I> background tasks. This actually just runs <I>ncftpbatch</I> -l |
| 568 |
for you. </DD> |
| 569 |
|
| 570 |
<dt> </dt> |
| 571 |
</DL> |
| 572 |
|
| 573 |
<pre>lcd</pre> |
| 574 |
|
| 575 |
<DL> |
| 576 |
|
| 577 |
<DD> The <I>lcd</I> command is the first of a few ``l'' commands that work |
| 578 |
with the local host. This changes the current working directory on the local |
| 579 |
host. If you want to download files into a different local directory, you |
| 580 |
could use <I>lcd</I> to change to that directory and then do your downloads. </DD> |
| 581 |
|
| 582 |
<dt> </dt> |
| 583 |
</DL> |
| 584 |
|
| 585 |
<pre>lchmod</pre> |
| 586 |
|
| 587 |
<DL> |
| 588 |
|
| 589 |
<DD> |
| 590 |
Runs ``/bin/chmod'' on the local host. </DD> |
| 591 |
|
| 592 |
<dt> </dt> |
| 593 |
</DL> |
| 594 |
|
| 595 |
<pre>lls</pre> |
| 596 |
|
| 597 |
<DL> |
| 598 |
|
| 599 |
<DD> Another local command that comes |
| 600 |
in handy is the <I>lls</I> command, which runs ``/bin/ls'' on the local host and displays |
| 601 |
the results in the program's window. You can use the same flags with <I>lls</I> |
| 602 |
as you would in your command shell, so you can do things like:</DD> |
| 603 |
|
| 604 |
</DL> |
| 605 |
|
| 606 |
<UL> |
| 607 |
<UL> |
| 608 |
<pre>lcd ~/doclls -lrt p*.txt</pre> |
| 609 |
<pre> </pre> |
| 610 |
</UL> |
| 611 |
</UL> |
| 612 |
<pre>lmkdir</pre> |
| 613 |
|
| 614 |
<DL> |
| 615 |
|
| 616 |
<DD> Runs ``/bin/mkdir'' on the local host. </DD> |
| 617 |
|
| 618 |
<dt> </dt> |
| 619 |
</DL> |
| 620 |
|
| 621 |
<tt>lookup</tt> |
| 622 |
|
| 623 |
<UL> |
| 624 |
<P>The program also has a built-in interface to the name service via the <I>lookup</I> |
| 625 |
command. This means you can lookup entries for remote hosts, like:</P> |
| 626 |
<UL> |
| 627 |
<pre>lookup cse.unl.edu ftp.cs.unl.edu sphygmomanometer.unl.edu</pre> |
| 628 |
</UL> |
| 629 |
<P>prints: |
| 630 |
|
| 631 |
<UL> |
| 632 |
|
| 633 |
<pre>cse.unl.edu 129.93.33.1 |
| 634 |
typhoon.unl.edu 129.93.33.24 |
| 635 |
sphygmomanometer.unl.edu 129.93.33.126</pre> |
| 636 |
|
| 637 |
</UL> |
| 638 |
|
| 639 |
<p> There is also a more detailed option, enabled with ``-v,'' i.e.: </p> |
| 640 |
<UL> |
| 641 |
<pre>lookup -v cse.unl.edu ftp.cs.unl.edu</pre> |
| 642 |
|
| 643 |
</UL> |
| 644 |
|
| 645 |
<p>prints:</p> |
| 646 |
<UL> |
| 647 |
<pre>cse.unl.edu: |
| 648 |
Name: cse.unl.edu |
| 649 |
Address: 129.93.33.1 |
| 650 |
|
| 651 |
ftp.cs.unl.edu: |
| 652 |
Name: typhoon.unl.edu |
| 653 |
Alias: <a href="ftp://ftp.cs.unl.edu">ftp.cs.unl.edu</a> |
| 654 |
Address: 129.93.33.24</pre> |
| 655 |
|
| 656 |
</UL> |
| 657 |
|
| 658 |
<p>You can also give <I>IP</I> addresses, so this would work too:</p> |
| 659 |
<UL> |
| 660 |
<pre>lookup 129.93.33.24</pre> |
| 661 |
</UL> |
| 662 |
<p> prints: </p> |
| 663 |
<UL> |
| 664 |
<pre>typhoon.unl.edu 129.93.33.24</pre> |
| 665 |
|
| 666 |
</UL> |
| 667 |
|
| 668 |
</UL> |
| 669 |
|
| 670 |
<pre>lpage</pre> |
| 671 |
|
| 672 |
<DL> |
| 673 |
|
| 674 |
<DD> Views a local file one page at a time, |
| 675 |
with your preferred $PAGER program. </DD> |
| 676 |
|
| 677 |
<dt> </dt> |
| 678 |
</DL> |
| 679 |
|
| 680 |
<pre>lpwd</pre> |
| 681 |
|
| 682 |
<DL> |
| 683 |
|
| 684 |
<DD> Prints the current local directory. |
| 685 |
Use this command when you forget where you are on your local machine. </DD> |
| 686 |
|
| 687 |
<dt> </dt> |
| 688 |
</DL> |
| 689 |
|
| 690 |
<pre>lrename</pre> |
| 691 |
|
| 692 |
<DL> |
| 693 |
|
| 694 |
<DD> |
| 695 |
Runs ``/bin/mv'' on the local host. </DD> |
| 696 |
|
| 697 |
<dt> </dt> |
| 698 |
</DL> |
| 699 |
|
| 700 |
<pre>lrm</pre> |
| 701 |
|
| 702 |
<DL> |
| 703 |
|
| 704 |
<DD> Runs ``/bin/rm'' on the local host. </DD> |
| 705 |
|
| 706 |
<dt> </dt> |
| 707 |
</DL> |
| 708 |
|
| 709 |
<pre>lrmdir</pre> |
| 710 |
|
| 711 |
<DL> |
| 712 |
|
| 713 |
<DD> |
| 714 |
Runs ``/bin/rmdir'' on the local host. </DD> |
| 715 |
|
| 716 |
<dt> </dt> |
| 717 |
</DL> |
| 718 |
|
| 719 |
<pre>ls</pre> |
| 720 |
|
| 721 |
<DL> |
| 722 |
|
| 723 |
<DD> Prints a directory listing from the |
| 724 |
remote system. It tries to behave like <I>UNIX</I>'s ``/bin/ls -CF'' command. If the remote |
| 725 |
server seems to be a <I>UNIX</I> host, you can also use the same flags you would |
| 726 |
with <I>ls</I>, for instance</DD> |
| 727 |
|
| 728 |
</DL> |
| 729 |
|
| 730 |
<UL> |
| 731 |
<UL> |
| 732 |
<pre>ls -rt</pre> |
| 733 |
</UL> |
| 734 |
</UL> |
| 735 |
|
| 736 |
<DL> |
| 737 |
|
| 738 |
<UL> |
| 739 |
|
| 740 |
<DT> would try to act like </DT> |
| 741 |
</UL> |
| 742 |
</DL> |
| 743 |
|
| 744 |
<UL> |
| 745 |
<UL> |
| 746 |
<pre>/bin/ls -CFrt</pre> |
| 747 |
</UL> |
| 748 |
</UL> |
| 749 |
|
| 750 |
<DL> |
| 751 |
|
| 752 |
<UL> |
| 753 |
<P> would on <i>UNIX</i>.</p> |
| 754 |
</UL> |
| 755 |
|
| 756 |
<DD><I>ncftp </I>has a powerful built-in system for dealing |
| 757 |
with directory listings. It tries to cache each one, so if you list the |
| 758 |
same directory, odds are it will display instantly. Behind the scenes, <I>ncftp</I> |
| 759 |
always tries a long listing, and then reformats it as it needs to. So even |
| 760 |
if your first listing of a directory was a regular ``ls'' which displayed the |
| 761 |
files in columns, your next listing could be ``ls -lrt'' and <I>ncftp</I> would still |
| 762 |
use the cached directory listing to quickly display the information for |
| 763 |
you! </DD> |
| 764 |
|
| 765 |
<dt> </dt> |
| 766 |
</DL> |
| 767 |
|
| 768 |
<pre>mkdir</pre> |
| 769 |
|
| 770 |
<DL> |
| 771 |
|
| 772 |
<DD> Creates a new directory on the remote host. For many public |
| 773 |
archives, you won't have the proper access permissions to do that. </DD> |
| 774 |
|
| 775 |
<dt> </dt> |
| 776 |
</DL> |
| 777 |
|
| 778 |
<pre>open</pre> |
| 779 |
|
| 780 |
<DL> |
| 781 |
|
| 782 |
<DD> |
| 783 |
Establishes an FTP control connection to a remote host. By default, <I>ncftp</I> |
| 784 |
logs in anonymously to the remote host. You may want to use a specific user |
| 785 |
account when you log in, so you can use the ``-u'' flag to specify which user. |
| 786 |
This example shows how to <I>open</I> the host ``bowser.nintendo.co.jp'' using the username |
| 787 |
``mario:''</DD> |
| 788 |
|
| 789 |
</DL> |
| 790 |
|
| 791 |
<UL> |
| 792 |
<UL> |
| 793 |
<pre>open -u mario bowser.nintendo.co.jp</pre> |
| 794 |
</UL> |
| 795 |
|
| 796 |
<P>Here is a list of flags you can use with the open command: |
| 797 |
<UL> |
| 798 |
<table width=100%> |
| 799 |
<tr> |
| 800 |
<td width=50><B>-u</B> <I>XX</I></td> |
| 801 |
<td>Use username <I>XX</I> instead of anonymous.</td> |
| 802 |
</tr> |
| 803 |
<tr> |
| 804 |
<td width=50><B>-p</B> <I>XX</I></td> |
| 805 |
<td>Use password <I>XX</I> with the username.</td> |
| 806 |
</tr> |
| 807 |
<tr> |
| 808 |
<td width=50><B>-j</B> <I>XX</I></td> |
| 809 |
<td>Use account <I>XX</I> in supplement to the username and password (deprecated)</td> |
| 810 |
</tr> |
| 811 |
<tr> |
| 812 |
<td width=50><B>-P</B> <I>XX</I></td> |
| 813 |
<td>Use port number <I>XX</I> instead of the default FTP service port (21).</td> |
| 814 |
</tr> |
| 815 |
</table> |
| 816 |
</UL> |
| 817 |
|
| 818 |
</UL> |
| 819 |
|
| 820 |
<pre>page</pre> |
| 821 |
|
| 822 |
<DL> |
| 823 |
|
| 824 |
<DD> Browses a remote file one page |
| 825 |
at a time, using your $PAGER program. This is useful for reading README's |
| 826 |
on the remote host without downloading them first. </DD> |
| 827 |
|
| 828 |
<dt> </dt> |
| 829 |
</DL> |
| 830 |
|
| 831 |
<pre>pdir, pls</pre> |
| 832 |
|
| 833 |
<DL> |
| 834 |
|
| 835 |
<DD> These commands |
| 836 |
are equivalent to <I>dir</I> and <I>ls</I> respectively, only they feed their output |
| 837 |
to your pager. These commands are useful if the directory listing scrolls |
| 838 |
off your screen. </DD> |
| 839 |
|
| 840 |
<dt> </dt> |
| 841 |
</DL> |
| 842 |
|
| 843 |
<pre>put</pre> |
| 844 |
|
| 845 |
<DL> |
| 846 |
|
| 847 |
<DD> Copies files from the local host to the remote machine's |
| 848 |
current working directory. To place a copy of ``xx.zip'' and ``yy.zip'' in the remote |
| 849 |
directory, you could try:</DD> |
| 850 |
|
| 851 |
</DL> |
| 852 |
|
| 853 |
<UL> |
| 854 |
<UL> |
| 855 |
<pre>put xx.zip yy.zip</pre> |
| 856 |
</UL> |
| 857 |
|
| 858 |
<DL> |
| 859 |
|
| 860 |
<DT> You could also accomplish that by using a wildcard expression, such as: |
| 861 |
</DT> |
| 862 |
</DL> |
| 863 |
|
| 864 |
<UL> |
| 865 |
<pre>put *.zip</pre> |
| 866 |
</UL> |
| 867 |
</UL> |
| 868 |
|
| 869 |
<DL> |
| 870 |
|
| 871 |
<DD> This command is similar to the behavior of other FTP programs' <I>mput</I> command. To send a remote file but give it a different name on your |
| 872 |
host, you can use the ``-z'' flag. This example shows how to upload a file called |
| 873 |
``ncftpd-2.0.6.tar.gz'' but name it remotely as ``NFTPD206.TGZ:''</DD> |
| 874 |
|
| 875 |
</DL> |
| 876 |
|
| 877 |
<UL> |
| 878 |
<UL> |
| 879 |
<pre>put -z ncftpd-2.0.6.tar.gz NFTPD206.TGZ</pre> |
| 880 |
</UL> |
| 881 |
</UL> |
| 882 |
|
| 883 |
<DL> |
| 884 |
|
| 885 |
<DD> The program <I>does</I> not try to ``resume'' uploads |
| 886 |
by default. If you do want to resume an upload, use the ``-z'' flag. </DD> |
| 887 |
|
| 888 |
<DD> </DD> |
| 889 |
|
| 890 |
<DD>There are |
| 891 |
also times where you want to append to an existing remote file. You can |
| 892 |
do this by using the ``-A'' flag, for example </DD> |
| 893 |
|
| 894 |
</DL> |
| 895 |
|
| 896 |
<UL> |
| 897 |
<UL> |
| 898 |
<pre>put -A log11.txt</pre> |
| 899 |
</UL> |
| 900 |
</UL> |
| 901 |
|
| 902 |
<DL> |
| 903 |
|
| 904 |
<UL> |
| 905 |
<p> would append to a file named ``log11.txt'' if it existed on |
| 906 |
the remote server. </p> |
| 907 |
</UL> |
| 908 |
|
| 909 |
<DD>Another thing you can do is delete a local file after |
| 910 |
you upload it. Use the double-D flag, such as ``put -DD'' to do this. </DD> |
| 911 |
|
| 912 |
<DT> </DT> |
| 913 |
<DD>The <I>put</I> command |
| 914 |
lets you send entire directory trees, too. It should work on all remote |
| 915 |
systems, so you can try ``put -R'' with a directory to upload the directory and |
| 916 |
its contents. </DD> |
| 917 |
|
| 918 |
<dt> </dt> |
| 919 |
</DL> |
| 920 |
|
| 921 |
<pre>pwd</pre> |
| 922 |
|
| 923 |
<DL> |
| 924 |
|
| 925 |
<DD> Prints the current remote working directory. A portion |
| 926 |
of the pathname is also displayed in the shell's prompt. </DD> |
| 927 |
|
| 928 |
<dt> </dt> |
| 929 |
</DL> |
| 930 |
|
| 931 |
<pre>quit</pre> |
| 932 |
|
| 933 |
<DL> |
| 934 |
|
| 935 |
<DD> Of course, |
| 936 |
when you finish using the program, type <I>quit</I> to end the program (You could |
| 937 |
also use <I>bye</I>, <I>exit</I>, or <I>^D</I>). </DD> |
| 938 |
|
| 939 |
<dt> </dt> |
| 940 |
</DL> |
| 941 |
|
| 942 |
<pre>quote</pre> |
| 943 |
|
| 944 |
<DL> |
| 945 |
|
| 946 |
<DD> This can be used to send a direct <I>FTP</I> |
| 947 |
Protocol command to the remote server. Generally this isn't too useful to |
| 948 |
the average user. </DD> |
| 949 |
|
| 950 |
<dt> </dt> |
| 951 |
</DL> |
| 952 |
|
| 953 |
<pre>rename</pre> |
| 954 |
|
| 955 |
<DL> |
| 956 |
|
| 957 |
<DD> If you need to change the name of a remote file, |
| 958 |
you can use the <I>rename</I> command, like:</DD> |
| 959 |
|
| 960 |
</DL> |
| 961 |
|
| 962 |
<UL> |
| 963 |
<UL> |
| 964 |
<pre>rename SPHYGMTR.TAR sphygmomanometer-2.3.1.tar</pre> |
| 965 |
</UL> |
| 966 |
</UL> |
| 967 |
<p> </p> |
| 968 |
<pre>rhelp</pre> |
| 969 |
|
| 970 |
<DL> |
| 971 |
|
| 972 |
<DD> Sends a help request |
| 973 |
to the remote server. The list of <I>FTP</I> Protocol commands is often printed, |
| 974 |
and sometimes some other information that is actually useful, like how |
| 975 |
to reach the site administrator. Depending on the remote server, you may |
| 976 |
be able to give a parameter to the server also, like: </DD> |
| 977 |
|
| 978 |
</DL> |
| 979 |
|
| 980 |
<UL> |
| 981 |
<UL> |
| 982 |
<pre>rhelp NLST</pre> |
| 983 |
</UL> |
| 984 |
</UL> |
| 985 |
|
| 986 |
<DL> |
| 987 |
|
| 988 |
<UL> |
| 989 |
|
| 990 |
<DT> One server responded: </DT> |
| 991 |
</UL> |
| 992 |
</DL> |
| 993 |
|
| 994 |
<UL> |
| 995 |
<UL> |
| 996 |
<pre>Syntax: NLST [ <sp> path-name ]</pre> |
| 997 |
</UL> |
| 998 |
</UL> |
| 999 |
|
| 1000 |
<DL> |
| 1001 |
|
| 1002 |
<DD> </DD> |
| 1003 |
|
| 1004 |
</DL> |
| 1005 |
|
| 1006 |
<pre>rm</pre> |
| 1007 |
|
| 1008 |
<DL> |
| 1009 |
|
| 1010 |
<DD> If you need to delete a remote file |
| 1011 |
you can try the <I>rm</I> command. Much of the time this won't work because you |
| 1012 |
won't have the proper access permissions. This command doesn't accept any |
| 1013 |
flags, so you can't nuke a whole tree by using ``-rf'' flags like you can on |
| 1014 |
<I>UNIX</I>. </DD> |
| 1015 |
|
| 1016 |
<dt> </dt> |
| 1017 |
</DL> |
| 1018 |
|
| 1019 |
<pre>rmdir</pre> |
| 1020 |
|
| 1021 |
<DL> |
| 1022 |
|
| 1023 |
<DD> Similarly, the <I>rmdir</I> command removes a directory. Depending |
| 1024 |
on the remote server, you may be able to remove a non-empty directory, so |
| 1025 |
be careful. </DD> |
| 1026 |
|
| 1027 |
<dt> </dt> |
| 1028 |
</DL> |
| 1029 |
|
| 1030 |
<pre>set</pre> |
| 1031 |
|
| 1032 |
<DL> |
| 1033 |
|
| 1034 |
<DD> This lets you configure some program variables, which are |
| 1035 |
saved between runs in the <I>$HOME/.ncftp/prefs</I> file. The basic syntax is:</DD> |
| 1036 |
|
| 1037 |
</DL> |
| 1038 |
|
| 1039 |
<UL> |
| 1040 |
<UL> |
| 1041 |
<pre>set <option> <value></pre> |
| 1042 |
</UL> |
| 1043 |
</UL> |
| 1044 |
|
| 1045 |
<DL> |
| 1046 |
|
| 1047 |
<UL> |
| 1048 |
|
| 1049 |
<DT> For example, to change the value you use for the anonymous |
| 1050 |
password, you might do: </DT> |
| 1051 |
</UL> |
| 1052 |
</DL> |
| 1053 |
|
| 1054 |
<UL> |
| 1055 |
<UL> |
| 1056 |
<pre>set anon-password [email protected]</pre> |
| 1057 |
</UL> |
| 1058 |
</UL> |
| 1059 |
|
| 1060 |
<DL> |
| 1061 |
|
| 1062 |
<UL> |
| 1063 |
<p> See the <a href="#sect5"> next section</a> for a list of things |
| 1064 |
you change. </p> |
| 1065 |
</UL> |
| 1066 |
|
| 1067 |
</DL> |
| 1068 |
|
| 1069 |
<pre>show</pre> |
| 1070 |
|
| 1071 |
<DL> |
| 1072 |
|
| 1073 |
<DD> This lets you display program variables. You can do ``show all'' |
| 1074 |
to display all of them, or give a variable name to just display that one, |
| 1075 |
such as:</DD> |
| 1076 |
|
| 1077 |
</DL> |
| 1078 |
|
| 1079 |
<UL> |
| 1080 |
<UL> |
| 1081 |
<pre>show anon-password</pre> |
| 1082 |
</UL> |
| 1083 |
</UL> |
| 1084 |
|
| 1085 |
<DL> |
| 1086 |
|
| 1087 |
<DD> </DD> |
| 1088 |
|
| 1089 |
</DL> |
| 1090 |
|
| 1091 |
<pre>site</pre> |
| 1092 |
|
| 1093 |
<DL> |
| 1094 |
|
| 1095 |
<DD> One obscure command you may have to use someday |
| 1096 |
is <I>site</I>. The <I>FTP</I> Protocol allows for ``site specific'' commands. These ``site'' commands |
| 1097 |
vary of course, such as:</DD> |
| 1098 |
|
| 1099 |
</DL> |
| 1100 |
|
| 1101 |
<UL> |
| 1102 |
<UL> |
| 1103 |
<pre>site chmod 644 README</pre> |
| 1104 |
</UL> |
| 1105 |
</UL> |
| 1106 |
|
| 1107 |
<UL> |
| 1108 |
<p> Actually, <I>ncftp</I>'s <I>chmod</I> command really does the |
| 1109 |
above. </p> |
| 1110 |
|
| 1111 |
<p>Try doing one of these to see what the remote server supports, if |
| 1112 |
any: </p> |
| 1113 |
</UL> |
| 1114 |
|
| 1115 |
<UL> |
| 1116 |
<UL> |
| 1117 |
<P><TT>rhelp SITE</TT> |
| 1118 |
<BR><TT>site help</TT> |
| 1119 |
</UL> |
| 1120 |
</UL> |
| 1121 |
|
| 1122 |
<DL> |
| 1123 |
|
| 1124 |
<DD> </DD> |
| 1125 |
|
| 1126 |
</DL> |
| 1127 |
|
| 1128 |
<pre>type</pre> |
| 1129 |
|
| 1130 |
<DL> |
| 1131 |
|
| 1132 |
<DD> You may need to change transfer types during |
| 1133 |
the course of a session with a server. You can use the <I>type</I> command to do |
| 1134 |
this. Try one of these:</DD> |
| 1135 |
|
| 1136 |
</DL> |
| 1137 |
|
| 1138 |
<UL> |
| 1139 |
<UL> |
| 1140 |
<pre>type ascii |
| 1141 |
type binary |
| 1142 |
type image</pre> |
| 1143 |
</UL> |
| 1144 |
</UL> |
| 1145 |
|
| 1146 |
<DL> |
| 1147 |
|
| 1148 |
<DD> The <I>ascii</I> command is equivalent to ``type a'', |
| 1149 |
and the <I>binary</I> command is equivalent to ``type i'' and ``type b''. </DD> |
| 1150 |
|
| 1151 |
<dt> </dt> |
| 1152 |
</DL> |
| 1153 |
|
| 1154 |
<pre>umask</pre> |
| 1155 |
|
| 1156 |
<DL> |
| 1157 |
|
| 1158 |
<DD> Sets the |
| 1159 |
process' <I>umask</I> on the remote server, if it has any concept of a umask, i.e.:</DD> |
| 1160 |
|
| 1161 |
</DL> |
| 1162 |
|
| 1163 |
<UL> |
| 1164 |
<UL> |
| 1165 |
<pre>umask 077</pre> |
| 1166 |
</UL> |
| 1167 |
</UL> |
| 1168 |
|
| 1169 |
<UL> |
| 1170 |
<p> However, this is not a standard command, so remote FTP servers may not support it.</p> |
| 1171 |
</UL> |
| 1172 |
<br> |
| 1173 |
|
| 1174 |
<pre>version</pre> |
| 1175 |
|
| 1176 |
<DL> |
| 1177 |
|
| 1178 |
<DD> This command dumps some information about the |
| 1179 |
particular edition of the program you are using, and how it was installed |
| 1180 |
on your system. </DD> |
| 1181 |
<dt> </dt> |
| 1182 |
</DL> |
| 1183 |
|
| 1184 |
<H3><A NAME="sect5" HREF="#toc5">Variable Reference</A></H3> |
| 1185 |
|
| 1186 |
<pre>anon-password</pre> |
| 1187 |
|
| 1188 |
<DL> |
| 1189 |
|
| 1190 |
<DD> Specifies what to use |
| 1191 |
for the password when logging in anonymously. Internet convention has been |
| 1192 |
to use your E-mail address as a courtesy to the site administrator. If you |
| 1193 |
change this, be aware that some sites require (i.e. they check for) valid |
| 1194 |
E-mail addresses. </DD> |
| 1195 |
|
| 1196 |
<dt> </dt> |
| 1197 |
</DL> |
| 1198 |
|
| 1199 |
<pre>auto-ascii</pre> |
| 1200 |
|
| 1201 |
<DL> |
| 1202 |
|
| 1203 |
<DD> If set to a list of pipe-character delimited extensions, files with |
| 1204 |
these extensions will be sent in ASCII mode even if binary mode is |
| 1205 |
currently in effect. This option allows you to transfer most files in |
| 1206 |
binary, with the exception of a few well-known file types that should be |
| 1207 |
sent in ASCII. This option is enabled by default, and set to a list |
| 1208 |
of common extensions (e.g., <tt>.txt</tt> and <tt>.html</tt>).</DD> |
| 1209 |
|
| 1210 |
<dt> </dt> |
| 1211 |
</DL> |
| 1212 |
|
| 1213 |
<pre>auto-resume</pre> |
| 1214 |
|
| 1215 |
<DL> |
| 1216 |
<DD> |
| 1217 |
<I>NcFTP</I> 3 now prompts the user by default when you |
| 1218 |
try to download a file that already exists locally, |
| 1219 |
or upload a file that already exists remotely. |
| 1220 |
Older versions of the program automatically guessed |
| 1221 |
whether to overwrite the existing file or attempt |
| 1222 |
to resume where it left off, but sometimes the program |
| 1223 |
would guess wrong. If you would prefer that |
| 1224 |
the program always guess which action to take, set |
| 1225 |
this variable to <i>yes</i>, otherwise, leave it set to <i>no</i> |
| 1226 |
and the program will prompt you for which action to |
| 1227 |
take. |
| 1228 |
</DD> |
| 1229 |
<dt> </dt> |
| 1230 |
</DL> |
| 1231 |
|
| 1232 |
<pre>autosave-bookmark-changes</pre> |
| 1233 |
|
| 1234 |
<DL> |
| 1235 |
|
| 1236 |
<DD> With the advent of version 3 of |
| 1237 |
<I>NcFTP</I>, the program treats bookmarks more like they would with your web |
| 1238 |
browser, which means that once you bookmark the site, the remote directory |
| 1239 |
is static. If you set this variable to <I>yes</I>, then the program will automatically |
| 1240 |
update the bookmark's starting remote directory with the directory you were |
| 1241 |
in when you closed the site. This behavior would be more like that of <I>NcFTP</I> |
| 1242 |
version 2. </DD> |
| 1243 |
|
| 1244 |
<dt> </dt> |
| 1245 |
</DL> |
| 1246 |
|
| 1247 |
<pre>confirm-close</pre> |
| 1248 |
|
| 1249 |
<DL> |
| 1250 |
|
| 1251 |
<DD> By default the program will ask you when a site |
| 1252 |
you haven't bookmarked is about to be closed. To turn this prompt off, you |
| 1253 |
can set this variable to <I>no</I>. </DD> |
| 1254 |
|
| 1255 |
<dt> </dt> |
| 1256 |
</DL> |
| 1257 |
|
| 1258 |
<pre>connect-timeout</pre> |
| 1259 |
|
| 1260 |
<DL> |
| 1261 |
|
| 1262 |
<DD> Previous versions of the program |
| 1263 |
used a single timeout value for everything. You can now have different values |
| 1264 |
for different operations. However, you probably do not need to change these |
| 1265 |
from the defaults unless you have special requirements. </DD> |
| 1266 |
|
| 1267 |
<DT> </DT> |
| 1268 |
<DD>The <I>connect-timeout</I> |
| 1269 |
variable controls how long to wait, in seconds, for a connection establishment |
| 1270 |
to complete before considering it hopeless. You can choose to not use a |
| 1271 |
timeout at all by setting this to -1. </DD> |
| 1272 |
|
| 1273 |
<dt> </dt> |
| 1274 |
</DL> |
| 1275 |
|
| 1276 |
<pre>control-timeout</pre> |
| 1277 |
|
| 1278 |
<DL> |
| 1279 |
|
| 1280 |
<DD> This is the timer used |
| 1281 |
when <I>ncftp</I> sends an FTP command over the control connection to the remote |
| 1282 |
server. If the server hasn't replied in that many seconds, it considers the |
| 1283 |
session lost. </DD> |
| 1284 |
|
| 1285 |
<dt> </dt> |
| 1286 |
</DL> |
| 1287 |
|
| 1288 |
<pre>logsize</pre> |
| 1289 |
|
| 1290 |
<DL> |
| 1291 |
|
| 1292 |
<DD> This is controls how large the transfer log ($HOME/.ncftp/log) |
| 1293 |
can grow to, in kilobytes. The default is 200, for 200kB; if you don't want |
| 1294 |
a log, set this to 0. </DD> |
| 1295 |
|
| 1296 |
<dt> </dt> |
| 1297 |
</DL> |
| 1298 |
|
| 1299 |
<pre>pager</pre> |
| 1300 |
|
| 1301 |
<DL> |
| 1302 |
|
| 1303 |
<DD> This is the external program to use to view |
| 1304 |
a text file, and is <I>more</I> by default. </DD> |
| 1305 |
|
| 1306 |
<dt> </dt> |
| 1307 |
</DL> |
| 1308 |
|
| 1309 |
<pre>passive</pre> |
| 1310 |
|
| 1311 |
<DL> |
| 1312 |
|
| 1313 |
<DD> This controls <I>ncftp</I>'s behavior |
| 1314 |
for data connections, and can be set to one of <I>on</I>, <I>off</I>, or the default, |
| 1315 |
<I>optional</I>. When passive mode is on, <I>ncftp</I> uses the FTP command primitive |
| 1316 |
<I>PASV</I> to have the client establish data connections to the server. The default |
| 1317 |
FTP protocol behavior is to use the FTP command primitive <I>PORT</I> which has |
| 1318 |
the server establish data connections to the client. The default setting |
| 1319 |
for this variable, <I>optional</I>, allows <I>ncftp</I> to choose whichever method it |
| 1320 |
deems necessary. </DD> |
| 1321 |
|
| 1322 |
<dt> </dt> |
| 1323 |
</DL> |
| 1324 |
|
| 1325 |
<pre>progress-meter</pre> |
| 1326 |
|
| 1327 |
<DL> |
| 1328 |
|
| 1329 |
<DD> You can change how the program reports file |
| 1330 |
transfer status. Select from meter <I>2</I>, <I>1</I>, or <I>0</I>. </DD> |
| 1331 |
|
| 1332 |
<dt> </dt> |
| 1333 |
|
| 1334 |
</DL> |
| 1335 |
|
| 1336 |
<pre>redial-delay</pre> |
| 1337 |
|
| 1338 |
<UL> |
| 1339 |
<P>When a host is busy or unavailable, the program waits this number of seconds before trying again. |
| 1340 |
The smallest you can set this is to 10 seconds -- so if you were planning on being inconsiderate, |
| 1341 |
think again. </P> |
| 1342 |
</UL> |
| 1343 |
|
| 1344 |
<pre>save-passwords</pre> |
| 1345 |
|
| 1346 |
<DL> |
| 1347 |
|
| 1348 |
<DD> If you set |
| 1349 |
this variable to <I>yes</I>, the program will save passwords along with the bookmarks |
| 1350 |
you save. While this makes non-anonymous logins more convenient, this can |
| 1351 |
be very dangerous since your account information is now sitting in the |
| 1352 |
$HOME/.ncftp/bookmarks file. The passwords aren't in clear text, but it is |
| 1353 |
still trivial to decode them if someone wants to make a modest effort. |
| 1354 |
</DD> |
| 1355 |
|
| 1356 |
<dt> </dt> |
| 1357 |
</DL> |
| 1358 |
|
| 1359 |
<pre>show-status-in-xterm-titlebar</pre> |
| 1360 |
|
| 1361 |
<DL> |
| 1362 |
|
| 1363 |
<DD> If set to <I>yes</I> and operating from within an <i>xterm</i> window, |
| 1364 |
the program will change the window's titlebar accordingly. </DD> |
| 1365 |
|
| 1366 |
<dt> </dt> |
| 1367 |
</DL> |
| 1368 |
|
| 1369 |
<pre>so-bufsize</pre> |
| 1370 |
|
| 1371 |
<DL> |
| 1372 |
|
| 1373 |
<DD> If your operating system supports <i> TCP Large Windows</i>, you can |
| 1374 |
try setting this variable to the number of bytes to set the TCP/IP socket |
| 1375 |
buffer to. This option won't be of much use unless the remote server also |
| 1376 |
supports large window sizes and is pre-configured with them enabled. </DD> |
| 1377 |
|
| 1378 |
<dt> </dt> |
| 1379 |
</DL> |
| 1380 |
|
| 1381 |
<pre>xfer-timeout</pre> |
| 1382 |
|
| 1383 |
<DL> |
| 1384 |
|
| 1385 |
<DD> |
| 1386 |
This timer controls how long to wait for data blocks to complete. Don't set |
| 1387 |
this too low or else your transfers will timeout without completing. </DD> |
| 1388 |
<dt> </dt> |
| 1389 |
</DL> |
| 1390 |
|
| 1391 |
<H3><A NAME="sect6" HREF="#toc6">Firewall |
| 1392 |
and Proxy Configuration</A></H3> |
| 1393 |
<P> |
| 1394 |
You may find that your network administrator has |
| 1395 |
placed a firewall between your machine and the Internet, and that you cannot |
| 1396 |
reach external hosts. <P> |
| 1397 |
The answer may be as simple as setting <I>ncftp</I> to use |
| 1398 |
<I>passive</I> mode only, which you can do from a <I>ncftp</I> command prompt like this: |
| 1399 |
<UL> |
| 1400 |
<PRE>set passive yes</PRE> |
| 1401 |
</UL> |
| 1402 |
<P> |
| 1403 |
The reason for this is because many firewalls do not allow incoming connections |
| 1404 |
to the site, but do allow users to establish outgoing connections. A passive |
| 1405 |
data connection is established by the client to the server, whereas the |
| 1406 |
default is for the server to establish the connection to the client, which |
| 1407 |
firewalls may object to. Of course, you now may have problems with sites |
| 1408 |
whose primitive FTP servers do not support passive mode. <P> |
| 1409 |
Otherwise, if you |
| 1410 |
know you need to have <I>ncftp</I> communicate directly with a firewall or proxy, |
| 1411 |
you can try editing the separate <I>$HOME/.ncftp/firewall</I> configuration file. |
| 1412 |
This file is created automatically the first time you run the program, |
| 1413 |
and contains all the information you need to get the program to work in |
| 1414 |
this setup. <P> |
| 1415 |
The basics of this process are configuring a firewall (proxy) |
| 1416 |
host to go through, a user account and password for authentication on the |
| 1417 |
firewall, and which type of firewall method to use. You can also setup an |
| 1418 |
exclusion list, so that <I>ncftp</I> does not use the firewall for hosts on the |
| 1419 |
local network. <P> |
| 1420 |
|
| 1421 |
<H2><A NAME="sect7" HREF="#toc7">Files</A></H2> |
| 1422 |
|
| 1423 |
<UL> |
| 1424 |
|
| 1425 |
<DL> |
| 1426 |
|
| 1427 |
<DT><tt>$HOME/.ncftp/bookmarks</tt></DT> |
| 1428 |
<DD>Saves bookmark and host information. |
| 1429 |
</DD> |
| 1430 |
|
| 1431 |
<DT><tt>$HOME/.ncftp/firewall</tt></DT> |
| 1432 |
<DD>Firewall access configuration file. </DD> |
| 1433 |
|
| 1434 |
<DT><tt>$HOME/.ncftp/prefs</tt></DT> |
| 1435 |
<DD>Program |
| 1436 |
preferences. </DD> |
| 1437 |
|
| 1438 |
<DT><tt>$HOME/.ncftp/trace</tt></DT> |
| 1439 |
<DD>Debugging output |
| 1440 |
for entire program run. </DD> |
| 1441 |
|
| 1442 |
<DT><tt>$HOME/.ncftp/v3init</tt></DT> |
| 1443 |
<DD>Used to tell if this version of |
| 1444 |
the program has run before. </DD> |
| 1445 |
|
| 1446 |
<DT><tt>$HOME/.ncftp/spool/</tt></DT> |
| 1447 |
<DD>Directory where background jobs are stored |
| 1448 |
in the form of spool configuration files. </DD> |
| 1449 |
|
| 1450 |
<DT><tt>$HOME/.ncftp/spool/log</tt></DT> |
| 1451 |
<DD>Information for background data |
| 1452 |
transfer processes. </DD> |
| 1453 |
|
| 1454 |
</DL> |
| 1455 |
|
| 1456 |
</UL> |
| 1457 |
|
| 1458 |
<H2><A NAME="sect8" HREF="#toc8">Environment</A></H2> |
| 1459 |
|
| 1460 |
<UL> |
| 1461 |
|
| 1462 |
<DL> |
| 1463 |
|
| 1464 |
<DT>PATH</DT> |
| 1465 |
<DD>User's search path, used to |
| 1466 |
find the <I>ncftpbatch</I> program, pager, and some other system utilities. </DD> |
| 1467 |
|
| 1468 |
<DT>PAGER</DT> |
| 1469 |
<DD>Program |
| 1470 |
to use to view text files one page at a time. </DD> |
| 1471 |
|
| 1472 |
<DT>TERM</DT> |
| 1473 |
<DD>If the program was compiled |
| 1474 |
with support for <I>GNU Readline</I> it will need to know how to manipulate the |
| 1475 |
terminal correctly for line-editing, etc. The pager program will also take |
| 1476 |
advantage of this setting. </DD> |
| 1477 |
|
| 1478 |
<DT>HOME</DT> |
| 1479 |
<DD>By default, the program writes its configuration |
| 1480 |
data in a <I>.ncftp</I> subdirectory of the <I>HOME</I> directory. </DD> |
| 1481 |
|
| 1482 |
<DT>NCFTPDIR</DT> |
| 1483 |
<DD>If set, the |
| 1484 |
program will use this directory instead of <I>$HOME/.ncftp</I>. This variable is |
| 1485 |
optional except for those users whose home directory is the root directory. |
| 1486 |
</DD> |
| 1487 |
|
| 1488 |
<DT>COLUMNS</DT> |
| 1489 |
<DD>Both the built-in <I>ls</I> command and the external <I>ls</I> command need this |
| 1490 |
to determine how many screen columns the terminal has. </DD> |
| 1491 |
</DL> |
| 1492 |
|
| 1493 |
</UL> |
| 1494 |
|
| 1495 |
<H2><A NAME="sect9" HREF="#toc9">Bugs</A></H2> |
| 1496 |
<UL> |
| 1497 |
<P> |
| 1498 |
There are no |
| 1499 |
such sites named <I>bowser.nintendo.co.jp</I> or <I>sphygmomanometer.unl.edu</I>. <P> |
| 1500 |
Auto-resume |
| 1501 |
should check the file timestamps instead of relying upon just the file |
| 1502 |
sizes, but it is difficult to do this reliably within FTP. <P> |
| 1503 |
Directory caching |
| 1504 |
and recursive downloads depend on <I>UNIX</I>-like behavior of the remote host. |
| 1505 |
</UL> |
| 1506 |
<P> |
| 1507 |
|
| 1508 |
|
| 1509 |
<H2><A NAME="sect10" HREF="#toc10">Author</A></H2> |
| 1510 |
<UL> |
| 1511 |
<P> |
| 1512 |
Mike Gleason, NcFTP Software. |
| 1513 |
</UL> |
| 1514 |
<P> |
| 1515 |
|
| 1516 |
<H2><A NAME="sect11" HREF="#toc11">See Also</A></H2> |
| 1517 |
<UL> |
| 1518 |
<P> |
| 1519 |
<I><I>ncftpput</I>(1)</I>, |
| 1520 |
<I><I>ncftpget</I>(1)</I>, <I><I>ncftpbatch</I>(1)</I>, <I><I>ftp</I>(1)</I>, <I><I>rcp</I>(1)</I>, <I><I>tftp</I>(1)</I>. <P> |
| 1521 |
<I>LibNcFTP</I> (<a href="http://www.ncftp.com/libncftp/">http://www.ncftp.com/libncftp</a>/). |
| 1522 |
<P> |
| 1523 |
<I>NcFTPd</I> (<a href="http://www.ncftp.com/ncftpd/">http://www.ncftp.com/ncftpd/</a>). |
| 1524 |
</UL> |
| 1525 |
<P> |
| 1526 |
|
| 1527 |
<H2><A NAME="sect12" HREF="#toc12">Thanks</A></H2> |
| 1528 |
<UL> |
| 1529 |
<P> |
| 1530 |
Thanks to everyone who uses |
| 1531 |
the program. Your support is what drives me to improve the program! <P> |
| 1532 |
I thank |
| 1533 |
Dale Botkin and Tim Russell at my former ISP, <I>Probe Technology</I>. <P> |
| 1534 |
Ideas and |
| 1535 |
some code contributed by my partner, Phil Dietz. <P> |
| 1536 |
Thanks to Brad Mittelstedt |
| 1537 |
and Chris Tjon, for driving and refining the development of the backbone |
| 1538 |
of this project, <I>LibNcFTP</I>. <P> |
| 1539 |
I'd like to thank my former system administrators, |
| 1540 |
most notably Charles Daniel, for making testing on a variety of platforms |
| 1541 |
possible, letting me have some extra disk space, and for maintaining the |
| 1542 |
UNL FTP site. <P> |
| 1543 |
For testing versions 1 and 2 above and beyond the call of |
| 1544 |
duty, I am especially grateful to: Phil Dietz, Kok Hon Yin, and Andrey A. Chernov |
| 1545 |
([email protected]). <P> |
| 1546 |
Thanks to Tim MacKenzie ([email protected]) for the |
| 1547 |
original filename completion code for version 2.3.0 and 2.4.2. <P> |
| 1548 |
Thanks to DaviD |
| 1549 |
W. Sanderson ([email protected]), for helping me out with the man page. <P> |
| 1550 |
Thanks to |
| 1551 |
those of you at <a href="http://www.unl.edu"> UNL</a> who appreciate my work. <P> |
| 1552 |
Thanks to Red Hat Software for |
| 1553 |
honoring my licensing agreement, but more importantly, thanks for providing |
| 1554 |
a solid and affordable development platform. |
| 1555 |
</UL> |
| 1556 |
<P> |
| 1557 |
|
| 1558 |
<H2><A NAME="sect13" HREF="#toc13">Apologies</A></H2> |
| 1559 |
<UL> |
| 1560 |
<P> |
| 1561 |
To the users, for |
| 1562 |
not being able to respond personally to most of your inquiries. <P> |
| 1563 |
To Phil, |
| 1564 |
for things not being the way they should be. |
| 1565 |
</UL> |
| 1566 |
<P> |
| 1567 |
|
| 1568 |
<HR><P> |
| 1569 |
<A NAME="toc"><B>Table of Contents</B></A> |
| 1570 |
<UL> |
| 1571 |
<LI><A NAME="toc0" HREF="#sect0">Name</A></LI> |
| 1572 |
<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI> |
| 1573 |
<LI><A NAME="toc2" HREF="#sect2">Description</A></LI> |
| 1574 |
<UL> |
| 1575 |
<LI><A NAME="toc3" HREF="#sect3">Introduction to the Command Shell</A></LI> |
| 1576 |
<LI><A NAME="toc4" HREF="#sect4">Command Reference</A></LI> |
| 1577 |
<LI><A NAME="toc5" HREF="#sect5">Variable Reference</A></LI> |
| 1578 |
<LI><A NAME="toc6" HREF="#sect6">Firewall and Proxy Configuration</A></LI> |
| 1579 |
</UL> |
| 1580 |
<LI><A NAME="toc7" HREF="#sect7">Files</A></LI> |
| 1581 |
<LI><A NAME="toc8" HREF="#sect8">Environment</A></LI> |
| 1582 |
<LI><A NAME="toc9" HREF="#sect9">Bugs</A></LI> |
| 1583 |
<LI><A NAME="toc10" HREF="#sect10">Author</A></LI> |
| 1584 |
<LI><A NAME="toc11" HREF="#sect11">See Also</A></LI> |
| 1585 |
<LI><A NAME="toc12" HREF="#sect12">Thanks</A></LI> |
| 1586 |
<LI><A NAME="toc13" HREF="#sect13">Apologies</A></LI> |
| 1587 |
</UL> |
| 1588 |
</BODY></HTML> |