150 lines
6.5 KiB
HTML
150 lines
6.5 KiB
HTML
<!--startcut ==========================================================-->
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>A New Console/Xterm FTP Client Issue 23</TITLE>
|
|
</HEAD>
|
|
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0020F0"
|
|
ALINK="#FF0000" >
|
|
|
|
<!--endcut ============================================================-->
|
|
|
|
<H4>
|
|
"Linux Gazette...<I>making Linux just a little more fun!</I>"
|
|
</H4>
|
|
|
|
<P> <HR> <P>
|
|
<!--===================================================================-->
|
|
|
|
|
|
<center><h1>Comfortable FTP</h1></center>
|
|
|
|
<center>
|
|
<h4><a href="mailto: layers@marktwain.net">by Larry Ayers</a></h4>
|
|
</center>
|
|
|
|
<p><hr><p>
|
|
|
|
<center><h3>Introduction</h3></center>
|
|
|
|
<p>There are quite a few FTP clients available for Linux these days. Several
|
|
of them are X programs, but why incur the overhead of running an X FTP client?
|
|
Downloading a file is not a very interactive process. Usually an FTP download
|
|
is a process running in the background, which just needs to be checked every
|
|
now and then.
|
|
|
|
<p>On the other hand, using the basic command-line FTP program is not much fun
|
|
unless you enjoy typing complete pathnames and filenames. A great improvement
|
|
is the classic ncurses-based client <b>NcFtp</b>, written by Mike Gleason.
|
|
This program has a well-designed bookmarking facility and supports the FTP
|
|
"reget" command, which allows resumption of interrupted
|
|
downloads. Unfortunately, file and directory names still must be typed in,
|
|
though NcFtp does support shell-like completion of filenames in both local and
|
|
remote directories.
|
|
|
|
<p>Recently I came across a new FTP client called <b>cftp</b>. It is being
|
|
developed by Dieter Baron, and though it is still a relatively new program, it
|
|
has been working superbly for me.
|
|
|
|
<center><h3>About cftp</h3></center>
|
|
|
|
<p>Cfpt isn't a showy application. It uses the termcap library, which allows
|
|
it to show a reverse-video modeline displaying the current host and directory,
|
|
as well as the number of bytes transferred. Otherwise it resembles a <b>ls
|
|
-l</b> listing of files in the remote directory. The default keybindings are
|
|
fairly intuitive: <b>d</b> downloads a file, <b>v</b> views a remote file
|
|
using your default pager, and the left and right arrow keys function like they
|
|
do in the <b>Lynx</b> text-mode web-browser: the left arrow-key takes you back
|
|
to the previous directory, and the right arrow-key descends into the
|
|
subdirectory under the cursor. The other key-bindings (as well as user
|
|
options) can be viewed during a session by typing <kbd>:help</kbd>. The colon
|
|
as a prefix to a command will be familiar to anyone who has used the <b>vi</b>
|
|
editor or one its clones. <b>Vi</b> and <b>Emacs</b> motion-keys can also be
|
|
used instead of the arrow-keys.
|
|
|
|
<p>What impressed me was the quickness with which the program starts up and
|
|
makes the connection; before you know it a directory listing is displayed.
|
|
This is a small and efficient little program which nevertheless has convenient
|
|
keyboard commands. It's just the thing for making a quick check of an FTP
|
|
site, perhaps reading a few *.lsm or README files, then pressing <b>q</b>
|
|
which tells cftp to first log off, then quit. Directory listings displayed
|
|
during a session are cached in memory, so returning to a previously-viewed
|
|
directory is near-instantaneous.
|
|
|
|
<p>Many FTP programs are in effect front-ends for the command-line FTP
|
|
utility, just as many mail clients use sendmail to do the actual
|
|
mail-handling. In contrast, cftp uses its own built-in FTP routines; this may
|
|
be one reason for its speed. Instead of passing an FTP command through a GUI
|
|
layer before handing it to the actual FTP executable, cftp is talking directly
|
|
with the remote server.
|
|
|
|
<center><h3>Aliases and Configuration</h3></center>
|
|
|
|
<p>There are two files which cftp reads when starting up, <i>~/.cftprc</i> and
|
|
<i>~/.netrc</i>. The <i>~/.cftprc</i> file can contain personal changes to
|
|
default settings, such as keybindings. Aliases for oft-visited sites can be
|
|
entered into this file as well. The line<br>
|
|
<p><kbd>alias sun ftp://sunsite.unc.edu/pub/Linux/Incoming</kbd><br>
|
|
<p>enables quick access to the site by merely typing <kbd>cftp sun</kbd>.
|
|
|
|
<p>The <i>~/.netrc</i> file is used by the default FTP program, as well as the
|
|
FTP facilities provided by GNU Emacs' dired and XEmacs' EFS. Cftp refers to
|
|
this file as well. An entry like this:<br>
|
|
|
|
<p><kbd>default login anonymous password [your e-mail address]</kbd><br>
|
|
|
|
<p>will save typing login info for sites which allow anonymous access, and if
|
|
you access a site for which you have a username and password, lines like
|
|
these:<br> <pre><kbd>machine [hostname] login [login-id] password [password]
|
|
macdef init cd /[directory to change to]</kbd></pre><br> will speed up
|
|
accessing the site.
|
|
|
|
<center><h3>New Enhancements</h3></center>
|
|
|
|
<p>When I began this review version 0.7 was the latest version; since then
|
|
version 0.8 has been released, which contains several new features:
|
|
|
|
<ul>
|
|
<li>In this version "putting" or uploading files to
|
|
a remote site is supported.
|
|
<li>Directory listings can now be sorted by date as well as by name.
|
|
<li>A new option is a beep when a download is completed. This is handy when
|
|
a session is running in the background or on another desk-top.
|
|
</ul>
|
|
|
|
<hr>
|
|
<center><h3>Conclusion</h3></center>
|
|
|
|
<p>As I write this <b>cftp-0.8.tar.gz</b> is the current version; the latest
|
|
release can be found at the cftp home
|
|
<a href="ftp://ftp.giga.or.at/pub/nih/cftp">FTP site</a>, or via the WWW at
|
|
<a href="http://ftp.giga.or.at/pub/nih/cftp">this site</a>.
|
|
|
|
<p>I enjoyed trying this small application and find myself using it often.
|
|
It's a small download and should compile easily if you have libtermcap
|
|
installed. If you do try it, let <a href="mailto://dillo@giga.or.at">
|
|
Deiter Baron</a> know what you think of it.
|
|
|
|
|
|
<!--===================================================================-->
|
|
<P> <hr> <P>
|
|
<center><H5>Copyright © 1997, Larry Ayers<BR>
|
|
Published in Issue 23 of <i>Linux Gazette</i>, December 1997</H5></center>
|
|
|
|
<!--===================================================================-->
|
|
<P> <hr> <P>
|
|
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
|
|
ALT="[ TABLE OF CONTENTS ]"></A>
|
|
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
|
|
|
|
ALT="[ FRONT PAGE ]"></A>
|
|
<A HREF="./bench2.html"><IMG SRC="../gx/back2.gif"
|
|
ALT=" Back "></A>
|
|
<A HREF="./tkman.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
|
|
<P> <hr> <P>
|
|
<!--startcut ==========================================================-->
|
|
</BODY>
|
|
</HTML>
|
|
<!--endcut ============================================================-->
|