FTP Related Articles > NcFTP Browser program for the File Transfer Protocol

NcFTP Browser program for the File Transfer Protocol

The purpose of ncftp is to provide a powerful and flexible interface to the Internet standard File Transfer Protocol. It is intended to replace the stock ftp program that comes with the system. Although the program appears to be rather spartan, you'll find that ncftp has a wealth of valuable performance and usage features. The program was designed with an emphasis on usability, and it does as much as it can for you automatically so you can do what you expect to do with a file transfer program, which is transfer files between two interconnected systems. Some of the cooler features include progress meters, filename completion, command-line editing, background processing, auto-resume downloads, bookmarking, cached directory listings, host redialing, working with firewalls and proxies, downloading entire directory trees, etc., etc. The ncftp distribution comes with the useful utility programs ncftpget and ncftpput which were designed to do command-line FTP. In particular, they are very handy for shell scripts. This version of ncftp no longer does command-line FTP, since the main ncftp program is more of a browser-type program.

Options

The program allows you to specify a ftp host or directory URL on the command line. This is a synonym for running ncftp and then using the open command. A few command-line flags are allowed with this mode:

    -u XX Use username XX instead of anonymous.
    -p XX Use password XX with the username.
    -j XX Use account XX in supplement to the username and password (deprecated)
    -P XX Use port number XX instead of the default FTP service port (21).

Introduction to the Command Shell

Upon running the program you are presented a command prompt where you type commands to the program's shell. Usually you will want to open a remote filesystem to transfer files to and from your local machine's filesystem. To do that, you need to know the symbolic name of the remote system, or its Internet Protocol (IP) address. For example, a symbolic name might be typhoon.unl.edu, and its IP address could be 129.93.33.24. To open a connection to that system, you use the program's open command:

    open typhoon.unl.edu
    open 129.93.33.24

Both of these try to open the machine called typhoon at the University of Nebraska. Using the symbolic name is the preferred way, because IP addresses may change without notice, while the symbolic names usually stay the same.

When you open a remote filesystem, you need to have permission. The FTP Protocol's authentication system is very similar to that of logging in to your account. You have to give an account name, and its password for access to that account's files. However, most remote systems that have anything you might be interested in don't require an account name for use. You can often get anonymous access to a remote filesystem and exchange files that have been made publicly accessible. The program attempts to get anonymous permission to a remote system by default. What actually happens is that the program tries to use anonymous as the account name, and when prompted for a password, uses your E-mail address as a courtesy to the remote system's maintainer. You can have the program try to use a specific account also. That will be explained later.

After the open command completes successfully, you are connected to the remote system and logged in. You should now see the command prompt change to reflect the name of the current remote directory. To see what's in the current remote directory, you can use the program's ls and dir commands. The former is terse, preferring more remote files in less screen space, and the latter is more verbose, giving detailed information about each item in the directory.

You can use the program's cd command to move to other directories on the remote system. The cd command behaves very much like the command of the same name in the Bourne and Korn shell.

The purpose of the program is to exchange data with other systems. You can use the program's get command to copy a file from the remote system to your local system:

    get README.txt

The program will display the progress of the transfer on the screen, so you can tell how much needs to be done before the transfer finishes. When the transfer does finish, then you can enter more commands to the program's command shell.

You can use the program's put command to copy a file from your system to the remote system:

    put something.tar

When you are finished using the remote system, you can open another one or use the quit

Before quitting, you may want to save the current FTP session's settings for later. You can use the bookmark command to save an entry into your $HOME/.ncftp/bookmarks file. When you use the bookmark command, you also specify a bookmark name, so the next time instead of opening the full hostname you can use the name of the bookmark. A bookmark acts just like one for your web browser, so it saves the remote directory you were in, the account name you used, etc., and other information it learned so that the next time you use the bookmark it should require as little effort from you as possible.

Source: NcFTP homepage

ORDER FTP HOSTING