Breadcrumbs 
Learning >> Documentation >> Internet >> ncFTP
 
Recent News
We're No 1!
We've reached the top! (Of Google!)
[ more ]
Firefox 3 Download Day
Firefox 3 has been officially released and is looking to set a world record for the most downloaded piece of software in 24hrs.
[ more ]
SSL Renewed
SSL cert has been renewed by the admin team.
[ more ]
NcFTP
NcFTP

NcFTP is a browser program for the File Transfer Protocol (FTP).

It is used to transfer files as a better alternative to the basic ftp program. Can be used to queue and schedule downloads and uploads, and save bookmarks for sites. 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.

You can use ncftp as follows:

$ ncftp
open -u [username] -p [password] [hostname] -P [port number]

Here you start up the ncftp program and at the new prompt use the 'open' command to connect to a server. Or from the shell prompt you can use:

$ ncftp -u [username] -p [password] [hostname] [port number]

But this is advised against as anyone can simply type "ps" from the shell and see your username, password and hostname for that session. Please note that the command line arguments are not essential.

Some servers do not require a login. These might be online mirrors that make software distributable. For example:

$ ncftp ftp.heanet.ie

This will log you into the HEAnet public FTP server as an anonymous user (using your email address as the password is common etiquite for anon FTP server usage) over port 21 (default FTP port).

So once you're logged in, what do you do?
You can use various FTP commands depending on what you want to accomplish.

Common Commands:
get - retrieve a file from the remote server to your local account
put - place a file from your local account onto the remote server
mget - retrieve multiple files at once
mput - place multiple files at once
ls - show the directory listing of the current remote directory
lls - show the directory listing of the current local directory (note the preceding 'l')
lh -
dir - same as 'ls'
cat [ filename ] - prints the contents of a text file (see cat for more info)
cd - change the current remote working directory
lcd - change the current local working directory (note the preceding 'l')

Most of these are similar to the bash commands for navigation. For an extensive listing of commands and usage can be found by typing "man ncftp" into your shell (not within ncftp itself) on frink.

Examples:

syxpak@frink:~$ ncftp ftp.heanet.ie
NcFTP 3.1.3 (Mar 27, 2002) by Mike Gleason (ncftp@ncftp.com).
Connecting to 193.1.219.88...
 Welcome to the Irish National Information Server FTP site.
 All connections are logged; if this is disagreeable, please
 disconnect now.

 This is a 2 Terabyte server with Gigabit access to the
 HEAnet backbone.

 This is a European mirror.  If you are in the USA, please
 use a mirror closer to home.

canyonero.heanet.ie FTP server ready.
Logging in...
Guest login ok, access restrictions apply.
Logged in to ftp.heanet.ie.
ncftp / > ls -l
drwxr-xr-x  66 1000  1000         4096   Aug 23 18:25   mirrors
drwxr-xr-x   6 1000  1000         4096   Aug 23 18:33   pub
ncftp / > cd pub/putty
ncftp /pub/putty > ls -l
drwxr-xr-x  5 1000  1000         4096   Sep 26  2002   0.52
drwxr-xr-x  5 1000  1000         4096   Oct  2  2002   0.53
drwxr-xr-x  5 1000  1000         4096   Nov 13  2002   0.53b
-rw-r--r--  1 1000  1000          390   Oct 20  2002   advertise.html
-rw-r--r--  1 1000  1000        31931   Jul  7 04:00   changes.html
-rw-r--r--  1 1000  1000         1948   Aug 26 09:36   docs.html
-rw-r--r--  1 1000  1000         1948   Aug 26 09:36   docs.html~
drwxr-xr-x  2 1000  1000           44   Nov  8  2002   download
-rw-r--r--  1 1000  1000        18236   Aug 26 09:36   download.html
-rw-r--r--  1 1000  1000        18426   Aug 26 09:36   download.html~
-rw-r--r--  1 1000  1000        53554   Jul  4 04:00   faq.html
-rw-r--r--  1 1000  1000        21062   Jul  4 04:00   feedback.html
-rw-r--r--  1 1000  1000          236   Jul 18 12:08   htaccess
-rw-r--r--  1 1000  1000          147   Aug 26 09:36   .htaccess
-rw-r--r--  1 1000  1000         3513   Jun 27 04:00   index.html
drwxr-xr-x  2 1000  1000          138   Sep 26  2002   keys
-rw-r--r--  1 1000  1000         5277   Jun 27 04:00   keys.html
lrwxr-xr-x  1 1000  1000            5   Apr  1 14:21   latest -> 0.53b
drwxr-xr-x  2 1000  1000           24   Nov  8  2002   legal
-rw-r--r--  1 1000  1000         3391   Jun 27 04:00   licence.html
-rw-r--r--  1 1000  1000         6360   Jul 18 04:00   links.html
-rw-r--r--  1 1000  1000         1865   Jun 27 04:00   maillist.html
-rw-r--r--  1 1000  1000        13583   Aug 14 04:00   mirrors.html
-rw-r--r--  1 1000  1000      2129920   Aug 26 04:00   putty-cvs.tar.gz
-rw-r--r--  1 1000  1000          318   Jan 11  2003   putty.ico
drwxr-xr-x  4 1000  1000         4096   Sep 26  2002   putty-snapshots
-rw-r--r--  1 1000  1000           47   May 15  2001   robots.txt
drwxr-xr-x  2 1000  1000         4096   Nov  8  2002   screenshots
-rw-r--r--  1 1000  1000          139   Jun 23  2001   sitestyle.css
-rw-r--r--  1 1000  1000         2356   Jun 27 04:00   team.html
drwxr-xr-x  2 1000  1000        12288   Aug 12 09:16   wishlist
ncftp /pub/putty > cd 0.53b/
ncftp /pub/putty/0.53b > ls -l
drwxr-xr-x  2 1000  1000         4096   Nov 13  2002   alpha
drwxr-xr-x  2 1000  1000         4096   Nov 13  2002   htmldoc
-rw-r--r--  1 1000  1000         2503   Aug 26 09:35   index.html
-rw-r--r--  1 1000  1000         2503   Aug 26 09:35   index.html?D=A
-rw-r--r--  1 1000  1000         2503   Aug 26 09:36   index.html?D=D
-rw-r--r--  1 1000  1000         2503   Aug 26 09:35   index.html?M=A
-rw-r--r--  1 1000  1000         2503   Aug 26 09:36   index.html?M=D
-rw-r--r--  1 1000  1000         2503   Aug 26 09:36   index.html?N=A
-rw-r--r--  1 1000  1000         2503   Aug 26 09:35   index.html?N=D
-rw-r--r--  1 1000  1000         2503   Aug 26 09:35   index.html?S=A
-rw-r--r--  1 1000  1000         2503   Aug 26 09:36   index.html?S=D
-rw-r--r--  1 1000  1000         1186   Nov 12  2002   md5sums
-rw-r--r--  1 1000  1000         1465   Nov 12  2002   md5sums.DSA
-rw-r--r--  1 1000  1000         1572   Nov 12  2002   md5sums.RSA
-rw-r--r--  1 1000  1000        24051   Nov 12  2002   putty.cnt
-rw-r--r--  1 1000  1000       275082   Nov 12  2002   puttydoc.txt
-rw-r--r--  1 1000  1000       112607   Nov 12  2002   puttydoc.zip
-rw-r--r--  1 1000  1000       432823   Nov 12  2002   putty.hlp
-rw-r--r--  1 1000  1000       578294   Nov 12  2002   putty-src.zip
-rw-r--r--  1 1000  1000           65   Nov 12  2002   putty-src.zip.DSA
-rw-r--r--  1 1000  1000          152   Nov 12  2002   putty-src.zip.RSA
-rw-r--r--  1 1000  1000            0   Feb 10  2002   robots.txt
drwxr-xr-x  2 1000  1000         4096   Nov 13  2002   x86
ncftp /pub/putty/0.53b > get putty-src.zip
putty-src.zip:                     ETA:   0:02  333.72/564.74 kB   92.75 kB/s
ncftp /pub/putty/0.53b > bye
In this example...
  1. I connected to the HEAnet ftp server, ncftp auto-logged me in as anonymous, giving my email address as the password.
  2. I then listed the contents of the root directory in long format (-l).
  3. Changed remote directory to "/pub/putty", listed the contents of the putty directory
  4. Changed remote directory to "/pub/putty/0.53b", again listing the contents of the directory in long format.
  5. I then 'got' the putty-src.zip file to my local directory from where I launched this ncftp session - in this case the root of my home directory on frink "/home/users/syxpak"
  6. The local directory (destination from where you will download/upload files to/from) can be changed in ncftp by using the "lcd" command.

If you plan on using ncftp, I would advise you to refer to the ncftp man pages (man ncftp) for more info or go to the NcFTP website.