What are these FTP commands used for?

Haule_francis April 12, 2014
Pinterest Stumbleupon Whatsapp

What are the purpose of each of the following FTP commands:

  • help
  • quit or bye
  • get
  • put
  • ascii
  • binary

  1. Ryan D
    April 13, 2014 at 4:39 am

    --> ftp -help = provides you with a pretty good syntax description of every flag you can use with the FTP command. It's a great resource if you can't remember exactly how to use FTP.

    The rest of the commands you mentioned are typically used after you've connected to an FTP session already and can type in FTP specific commands for that connection.

    --> get is the command that you use to retrieve a file from the remote FTP server and place it in your local directory (wherever you were before you launched the FTP command)
    **Pro Tip: using the "mget" command you can transfer multiple files at once using a filter, which can save a lot of time**
    --> put is to transfer a file from your local directory to the remote FTP server. Just follow it with the name of the file (including extension)
    --> ascii and binary - In the FTP command window, you can simply type the word "ascii" or "binary" to set the transfer mode. As Oron mentioned, ascii sets it to use seven bits per character, and binary uses eight bits per byte.
    --> quit or bye - Typing either of these will exit the FTP environment. However, if you just want to close the connection but stay in the FTP environment, you would use the "close" command instead.

    Hope that helps!

  2. Oron J
    April 12, 2014 at 8:35 pm

    These are the basic FTP instructions. Help prints out a help screen; quit or bye quit the program. Get downloads file(s) and put uploads file(s). Ascii or binary relate to the type of file you may be transferring, namely, ASCII (text file, 7 bit) or binary (8 bit "as is"). Nowadays, hardly anyone uses 7 bit encoding so most sessions will stay in binary mode, but in ye olde days...