The ftp service is the interface to the file transfer protocol. This service provides a connection service to a remote computer along with file manipulation functions including sending and receiving files. It also provides user authentication, unlike rcp. It supports different file types.
To connect with a remote host, you can simply type ftp hostname. The hostname can either be a hostname or an Internet address. If you do not specify a remote host on the command line, you enter ftp command mode. Then you can use the open command to initiate a connection.
By default, when a connection is initiated via ftp, the remote ftp server starts up the login process. You must enter a valid user name and password in order to access the remote system. Once you have been authenticated, you are connected to the remote ftp server and it awaits your commands.
The next table presents any common ftp service commands:
| open |
Open a connection to specified host. |
| close |
Close current open connection. |
| quit |
Close current open connection and exit ftp. |
|
binary
|
Change the file representation type to binary.
|
|
ascii
|
Change the file representation type to ascii.
|
|
put
|
Transfer a single file from the local to the remote host.
|
|
mput
|
Transfer multiple files from the local to the remote host.
|
|
get
|
Transfer a single file from the remote to the local host.
|
|
mget
|
Transfer multiple files from the remote to the local host.
|
|
cd
|
Change remote's current working directory (UNIX cd).
|
|
lcd
|
Change the local's current working directory (UNIX cd).
|
|
dir
|
List the remote's current working directory (UNIX ls).
|
|
pwd
|
Print the remote's current working directory (UNIX pwd).
|
|
mkdir
|
Make a new directory on the remote (UNIX mkdir).
|
|
rmdir
|
Delete a directory on the remote (UNIX rmdir).
|
|
rename
|
Change the name of a remote file or directory (UNIX mv).
|
|
delete
|
Delete a remote file (UNIX rm, with one file specified).
|
|
mdelete
|
Delete multiple remote files (UNIX rm, with multiple files).
|
|
?
|
Obtain help about ftp.
|