ftp ( English File transfer protocol ) is a standard operating system program designed to receive and transfer files using the FTP protocol ( FTP client ). Included with UNIX, Windows.
| ftp | |
|---|---|
Typical ftp session | |
| Type of | FTP client |
| Interface | command line |
Command Line Keys
Modes of operation of the program can be specified on the command line or in the command interpreter.
| -p | Passive data transfer. |
| -A | Data transfer in active mode. |
| -i | Disable interactive request when transferring multiple files. |
| -n | Prevents automatic login when a connection is established. |
| -e | Forbids editing teams and using the history of teams. |
| -g | Prevents globalization of file names. |
| -m | By default, the data channel in passive mode is bound to the same interface as the control channel. The option prohibits this behavior. |
| -v | Shows all server responses and data transfer statistics. |
| -d | Allows debugging. |
The command line can also indicate the remote computer with which the connection should be established. If it is specified, then the ftp program after starting tries to establish a connection with it, if not, it goes into command mode and waits for user instructions.
Internal Commands
When waiting for a command from the user, the program issues a request
- ftp>
The main program commands:
| ! [command [options]] | Invokes a command interpreter on the local machine. |
| help [command] | Gives help on the specified command. |
| lcd [directory] | Changes the working directory on the local computer |
| open remote_computer [port] | Establishes a connection with a remote computer. |
| user user [password] [account] | Identifies the user of the remote computer. If automatic login is not prohibited, the authentication process starts when a connection to the FTP server is established. |
| ascii | Sets the ASCII file transfer mode. |
| binary | Sets the binary file transfer mode. |
| cd directory | Changes the working directory on the remote computer. |
| mkdir catalog | Creates a directory on a remote computer. |
| delete file | Deletes the file on the remote computer. |
| dir [directory] [local_file] | Prints a list of files in a directory on a remote computer to a local file or to a terminal if no file is specified. |
| get file [local_file] | Accepts a file from a remote computer. |
| reget file [local_file] | Acts as get, however, if a local file exists and its size is smaller than the file on the remote computer, then it is downloaded from the point of disconnection. |
| restart offset | Runs the following get or put command at the specified offset in the file. |
| put local_file [file] | Transfer the local file to the remote computer. |
| pwd | Prints the name of the working directory on the remote computer. |
| rename [old] [new] | Renames a file on a remote computer. |
| close | Ends an FTP session. |
| bye | Ends an FTP session and exits the program. |
Links
UNIX man pages: ftp () (English) (August 15, 1999). Date of treatment May 19, 2012. Archived September 22, 2012.