Basic FTP Commands

The following FTP commands all function the same regardless of which operating system is being run on your computer and also regardless of which is being run on the remote computer.
 

To start a session

ftp ip-address-or-domain-name [port]
start an ftp session and establish a connection with the remote system identified by ip-address-or-domain-name.
 

Once the Session is Started.

user user-name [password] [account]
log on to the remote system so as to gain access to that system. If password and/or account are required but not entered then the system will prompt for them. You must log on to the remote system after connecting to the system in order to have authority to execute commands that access the remote system.

append local-file [remote-file]
will append local-file from your computer to the end of remote-file on the remote computer that you are connected to. Current file type settings are used. If remote-file is not specified then the same filename as local-file is assumed.

get remote-file [local-file]
will retrieve remote-file from the remote computer that you are connected to and save it on your computer as local-file. Current file type settings are used. If local-file is not specified then the same filename as remote-file is assumed. recv is an alternate name for get.

put local-file [remote-file]
will send local file from your computer and save it as remote-file on the remote computer that you are connected to. Current file type settings are used. If remote-file is not specified then the same filename as local-file is assumed. send is an alternate name for put.

delete remote-file
will delete remote-file from the remote computer that you are connected to.

ascii
sets file type for transfer to text mode. Record separators will be converted depending on the local and remote operating systems. Translation between ascii and ebcdic character sets will also take place where appropriate.

binary
sets file type for transfer to binary mode. No translation of the code will take place during the transfer.

literal argument [...]
passes operating system dependent commands to the remote system. quote is an alternate name for literal.

disconnect
terminate the current ftp connection but retain the ftp session.

open ip-address-or-domain-name [port]
establish a new connection with the new remote system identified by ip-address-or-domain-name.

bye
terminate an ftp session and end the connection to the remote computer. quit and close are alternate names for bye.

 

This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow
Donate