list of ftp commands
List of FTP Commands
Why should one use FTP? Apart from the obvious benefits it provides, of allowing remote authenticated access to files on a remote server, and their easy transfer irrespective of size, FTP is extremely easy to use; you just need to be well-versed with its commands. Buzzle provides you a complete list of all FTP commands, to make your task all the more simple.
Interestingly,
FTP (File Transfer Protocol), although extraordinarily useful, is not exactly the most secure method of file transfer available. However, it is possible to use FTP over protocols such as SSL (Secure Sockets Layer) and/or SSH (Secure Shell) to implement additional protection on the data transfer process. ** SSH is a secure way to acquire remote access to a computer, whereas SSL is a protocol that improves security at the transport layer of the network architecture by providing tunneling through a secure socket.- ✐ In Windows, one can open the MS DOS command prompt by opening the Start Menu, and typing "cmd" in the Search Box, followed by the Enter ↵ key.
- ✐ If you are using a Mac computer, you can find the Terminal inside the Utilities folder in the Applications menu.
- ✐ In Linux-based OS computers, one can open the Terminal by pressing the Ctrl, Alt, and T keys.
S. No. | Command | Function |
1. | ! | If an exclamation point (!) is typed before a command, then instead of on the remote server system, the command will be executed on your own (local host's) system. |
2. | append | With this command, using the current file setting, one can add a file that is located on one's own (local host) computer to a file located on the remote server. |
3. | ascii | Since files can be transferred in either ASCII mode (as in the case of text files) or binary mode (as in the case of executable files, or programs), this command can revert the file transfer mode to the ASCII mode, which is also the default. |
4. | bell | With this command, a bell can be scheduled to ring after each file transfer. It is toggled off by default. |
5. | binary | As mentioned, there are two file transfer modes; ASCII and binary. By using this command, one can change the current file transfer mode to binary. |
6. | bye | This command can be used interchangeably with the 'quit' command to terminate the FTP session with the remote server, along with closing the FTP prompt. |
7. | cd | Just like with MS DOS, the 'cd' command stands for Change Directory, and it can be used to navigate into folders in the remote computer. When the command is followed by the folder name, its effect is the same as double-clicking on a folder in Windows Explorer. |
8. | close | Only the FTP session and not the prompt application entirely, can be ended if this command is used. |
9. | debug | The function of debugging all sent commands can be toggled on or off with the help of this command; however, the default setting is off. |
10. | delete | This function can be used when one wants to delete a single file on the remote server computer. The filename should follow the command. A different command is to be used if you need to delete more than one file at a time. |
11. | dir | When you wish to know the contents of a folder, you can use this command. A list of all the files within a directory will be displayed if this command is followed by the respective directory's name. |
12. | disconnect | This command ends the connection with the remote server, but it does not terminate the session, nor cause you to exit from the terminal application. |
13. | get | This is the command that is used to copy a single file located on the server on to one's own computer. This command needs to be followed by the name of the remote file as well as the name that you wish for it to be saved with on the local host. |
14. | glob | This is another toggle command. When switched on, wildcard characters can be used in the name of local file names or directory names. |
15. | hash | Yet another toggle command, the 'hash' command toggles the function of marking every block of data (of 2KB) that is transferred, by printing a "#" (hash) sign for it. It is off by default. |
16. | help | This function can be used alternatively with the question mark (?) command. |
17. | lcd | Suppose you wish to change the directory on your local computer (otherwise the path where your downloaded files will get saved will be the same as the path before you started the FTP session), then you can type this command followed by the directory you wish to shift to. |
18. | literal | This command is used to communicate certain arguments (parameters) to the remote server, and elicit a response from the server. The command is followed by the verbatim. |
19. | ls | While the 'dir' command gives you all the information you can get about the directory's sub-folders and files, the 'ls' command, which has a similar syntax, will give you the same information, abbreviated, in list form. |
20. | mdelete | This command extends the functionality of the 'delete' command to more than one file located on the remote server. One needs to enter the names of all the files one wishes to delete after the command. |
21. | mdir | If you wish to extend the functionality of the 'dir' command to multiple folders, you can use 'mdir', which can give you information about the contents of more than one directory located on the remote server at a time. |
22. | mget | If you wish to download (copy from the server computer to your own) more than one file at a time, the 'mget' function should be used. Specify the names of the files to be copied after the command. |
23. | mkdir | This command can be used to create a directory on the remote system. |
24. | mls | This command extends the functionality of the 'ls' command to multiple folders located on the remote server host. |
25. | mput | With the current transfer type setting retained, this command allows you to upload more than one file that is located on your computer, on to the remote server. |
26. | open | When an FTP session is running, one can begin a connection to any remote server computer using this command. In the syntax, apart from the command and either the domain name of the server or its IP address, one can also mention the port number to be used to establish this connection. It is compulsory to specify the port number if you wish to connect to another server while one connection is still valid, because the default port, 21, is already in use. |
27. | prompt | This command acts as a toggle switch for the prompting function, whose effect is especially seen while using commands dealing with multiple files, because it will prompt the user for confirmation before the action is performed on each file separately. By default, the function of prompting is on. |
28. | put | This command is used to copy (upload) a single file to the remote server computer. The name of the file that you wish to copy needs to follow the command. |
29. | pwd | pwd is a UNIX-based command that stands for Print Working Directory. It returns the path of the current folder that is open on the remotely-located server that you are connected to. |
30. | quit | This command can be used interchangeably with 'bye' to close the terminal (command prompt) and simultaneously also end the FTP session and break any connection with a remote server. |
31. | quote | This command can be used interchangeably with 'literal' to send arguments or verbatim to the remote server. It also follows the same syntax. |
32. | recv | This command can be used interchangeably with the 'get' command to download a file from the remote server onto one's own computer. |
33. | remotehelp | This command gives you information about commands that can be used with the remote server. If a specific command is typed following 'remotehelp, one can obtain information about that command. |
34. | rename | This command can be used to rename a file that is located on the remote server computer. The command needs to be followed by the name of the file that you wish to alter, after which you should type the new name you wish to assign to it. |
35. | rmdir | This command can be used to delete an entire directory and all its contents that is located on the remote server host. The command needs to be followed by the directory's name. |
36. | send | Identical to the 'put' command and following the same syntax, this command uploads a file onto the remote server computer. |
37. | status | This command can be used to obtain information about the current status of all FTP connections and settings that can be toggled. |
38. | trace | This command can be used to toggle the function of packet tracing, or displaying the route, for each packet sent or received during the FTP session. By default, packet tracing is off. |
39. | type | This command can be used to set the file transfer type implicitly. There are two types that are supported; ASCII, and binary. You need to specify the type after the command. |
40. | user | If you wish or have to log on to the remote server as a specific user, use this command followed by the username, password, and account type; the last two being optional. However, if the server computer has been configured in such a way that it requires a password and/or the account type to be specified before permitting a user to log on, you will be prompted for those values. |