Subject: enhanced functionality ftp(1)
To: None <current-users@NetBSD.ORG>
From: Luke Mewburn <>
List: current-users
Date: 11/28/1996 16:49:36
As some may be aware, I've been adding features and fixing bugs in
NetBSD's ftp(1) command. These have come from various places:
myself, FreeBSD, OpenBSD, Noah Friedman, and people I've spoken
to locally.

The following commands/options have been added:
* preserve: toggle preservation of modification times of retreived files
* lpwd: local pwd (complements lcd)
* exit: synonym for quit
* ftp: synonym for open
* msend: synonym for mput
* -a: autologin anonymously to host
* -p: set passive mode automatically

Changed commands:
* hash: can take an optional positive integer argument, which
  changes the amount of bytes/hash mark
* modtime: returns time in localtime (not GMT), formatted with
  asctime(3), so looks more like a ``normal'' UNIX time string

General features:
* file transfer statistics are printed with more human-friendly values
* on receipt of a SIGINFO signal (see stty(1)'s status command
  for more info), the current file transfer statistics are displayed
* commands that can be toggled can be explictly turned 'on' or
  'off' by specifying the appropriate 'on'/'off' as an argument
* autofetch of files on command line via URL (ftp://host/file) or
  classic (host:/file) nomenclatures
* mput/mget/mdelete confirmations can now be answered with:
	n	answer no (as before)
	a	answer 'y' to all remaining files in this command
	p	turn prompting off (as if 'prompt off' was done)
     <other>	answer 'y' to current prompt

Bug fixes:
* check/enforce string lengths to prevent buffer overruns
* detect extra (errornous) arguments to many commands
* don't echo 'ACCT' parameters in debug mode
* fix checking directory access of "/foo". parent dir is "/" not ""

(and probably a few I missed)

These changes add some very useful functionality to ftp(1),
hopefully without compromising on program size bloat.
If there's any problems with these changes, please contact me asap.

Other features that I'm looking at implementing include:
* support for transfer percentage bar, a la ncftp (done using
  \r and hashes)
* command editing/recall using libedit
* filename completion on local and remote files

These would possibly have the ability to be compiled out, to reduce
binary size on install media. I'll need to think about this.

Any comments or request for features? Please reply to me and I'll

Luke Mewburn <>