What are some common FTP commands?

Some FTP commands are the same on different computers, but others are not. You can usually get a list of commands if you enter help or ? (question mark) at the ftp> prompt. Some computers, such as Unix systems, may offer online information about FTP. At your computer's operating system prompt, try entering one of the following:

  man ftp
  man ftpd
  help ftp

Note: FTP clients that have a graphical user interface (GUI), such as Transmit, Rapid Filer, and WS-FTP, usually do not require you to know and use these commands regularly. You may have a few occasions to use them if the program also has a command line interface.

Some useful FTP commands available on most systems include:

ascii
Switch to ASCII mode. ASCII mode is the default mode; use it for transferring text files.
binary
Switch to binary mode. Use to transfer binary files, including files ending in .zip, .tar, .Z, and .gz, executable programs, and graphics files.
bye (or quit)
Close the connection to the remote computer and exit FTP.
cd
Change the directory on the remote computer.
close
Close the connection to the remote computer.
del
Delete files from the remote computer.
dir (or ls)
List the files in the current directory on the remote computer.
get
Copy a file from the remote computer to the local computer.
hash
Displays a # on the screen for every block of bytes transferred. A block is 1024 bytes in some cases, 2048 in others, but is between 1024 and 4096 in most cases. Check FTP's online help for the number represented in the FTP program you are using.
help (or ?)
Lists or provides help on the use of FTP commands.
lcd
Change the directory on the local computer.
lpwd
Show the current directory (present working directory) on the local computer. This command is not available in all FTP versions. On Unix systems, try !pwd if lpwd doesn't work.
mdel
Delete multiple files on the remote computer.
mget
Copy multiple files from the remote computer to the local computer.
mkdir
Create a directory on the remote host.
mput
Copy multiple files from the local computer to the remote computer.
open
Open a connection to a remote computer.
prompt
Turn on (or turn off) file transfer prompting. Often used to turn off prompting when using mdel, mput, or mget so that you are not required to confirm the transfer of each file before it is transferred.
put
Copy a file from the local computer to the remote computer.
pwd
Show the current directory (present working directory) on the remote computer.
rmdir
Remove a directory on the remote host (the directory usually has to be empty).
user
Log into the remote computer to which you are currently connected. FTP will ask for a login name and possibly a password.
!
In Unix, exit to the shell prompt, where you can enter commands. Enter exit to get back to FTP. If you follow ! with a command (e.g., !pwd), FTP will execute the command without dropping you to the Unix prompt.

This is document aenq in the Knowledge Base.
Last modified on 2017-05-16 11:50:28.

  • Fill out this form to submit your issue to the UITS Support Center.
  • Please note that you must be affiliated with Indiana University to receive support.
  • All fields are required.

Please provide your IU email address. If you currently have a problem receiving email at your IU account, enter an alternate email address.

  • Fill out this form to submit your comment to the IU Knowledge Base.
  • If you are affiliated with Indiana University and need help with a computing problem, please use the I need help with a computing problem section above, or contact your campus Support Center.

Please provide your IU email address. If you currently have a problem receiving email at your IU account, enter an alternate email address.