# ftp(3)

[Home] [Commands] [Variables] [Macro-Dev] [Glossary]

## NAME

ftp - Initiate an FTP connection

## SYNOPSIS

ftp

## DESCRIPTION

ftp initiates a File Transfer Protocol (FTP) connection to a remote host on the network. Using FTP, editing of files may be performed in much the same way as on the local file system. Directory listings may be retrieved and traversed using the mouse or cursor keys. Using the directory listing, files may be transfered to/from the remote host to the local machine.

On issuing the command then a dialog is presented to the user which is used to open the connection. The dialog entries are defined as follows:-

Registry File

The name of a MicroEmacs registry file which is used to store the FTP information. If a registry name is provided then all FTP address information is stored in the registry file and saved for later sessions. Be aware that password information is saved in this file as plain text if a password is entered into the site information.

If the registry information is omitted then the information is not saved between sessions.

Site Name

An ASCII pseudo name for the remote host. The pull-down menu may be used to select existing sites that have been previously entered.

Host Address

The address of the host, this may be an IP address (`111.222.333.444`) or a DNS name (i.e. `ftp.mysite.com`).

User Name

The login name for the site. If this is omitted then $user-name(5) is used by default.

Password

The password used to enter the site for the given login name. If the password is NOT supplied then the user is prompted for the password when a transaction takes place. If the password is omitted and left to promt then it is not stored in the registry.

Take note of the comments provided above regarding the password information.

Initial Host Path

The starting directory at the remote host. If this is omitted then the root directory ('`/`') is used by default.

On selecting Connect then a FTP connection is opened and the initial directory appears as a directory listing, if the initial path is a file then the file is loaded into the editor.

Thereafter the file may be edited within the editor as normal, on a write operation then the file is written back to the host, via FTP.

On opening a FTP connection the progress of the transfer, and the FTP commands issued, may be viewed in the `*ftp-console*` buffer. This buffer may automatically appear depending upon the value of the %ftp-flags(5) variable.

## NOTES

ftp is a macro implemented in `ftp.emf`. This uses the underlying command find-file(2) to implement the FTP transfer.

FTP files can be directly loaded and edited using the standard file commands such as find-file(2).

The FTP addresses are retained in a registry file (see erf(8)). The registry file is automatically loaded when MicroEmacs starts up each session. The current site information may be viewed using list-registry(2) and is located at the following registry addresses:-

/url

Data value is file system location of the FTP registry file.

/url/ftp/<hostName>

The name of the host to which the connection is to be made.

/url/ftp/<hostName>/host

The name or IP address of the remote host

/url/ftp/<hostName>/user

The user name used to log into the remote host.

/url/ftp/<hostName>/pass

The user password to the remote host. If this entry is empty then the user is always prompted for the password when the connection is made.

/url/ftp/<hostName>/path

The initial path at the remote site.

When a FTP connection is initiated then the connection (socket) remains open for a period of approximately 4 minutes from the last transfer time, after that the connection is automatically closed and is re-initiated if required again.

NOTE: For windows platforms then the resultant executable must be built with URL support enabled, for UNIX platforms socket support is automatically enabled.

## BUGS

Directory completion is not available when the current working directory is an FTP address. To work around this from the command line, select `<RETURN>` to get a directory listing of the current directory and select the file(s) from the directory to load.

## SEE ALSO

%ftp-flags(5), $user-name(5), erf(8), find-file(2), file-op(2), list-registry(2).

(c) Copyright JASSPA 2009
Last Modified: 2009/08/29
Generated On: 2009/10/12

</HMTL>