Before downloading files, there are a few things that you need to take care of.
To turn on hash mark printing, give the command hash.
Why does the file type matter? Only because on some systems (such as MS-DOS systems), certain characters in a text file, such as carriage returns, need to be converted so that the file will be readable. While transferring in binary mode, no conversion is done---the file is simply transferred byte after byte.
The commands bin and ascii set the transfer mode to binary and text, respectively. When in doubt, always use binary mode to transfer files. If you try to transfer a binary file in text mode, you'll corrupt the file and it will be unusable. (This is one of the most common mistakes made when using FTP.) However, you can use text mode for plain text files (whose filenames often end in .txt).
For our example, we're downloading the file README, which is most likely a text file, so we use the command
For example, to set the local directory to /home/db/mdw/tmp, use the command
Now you're ready to actually download the file. The command
is used for this, where remote-name is the name of the file on the remote machine, and local-name is the name that you wish to give the file on your local machine. The local-name argument is optional; by default, the local filename is the same as the remote one. However, if for example you're downloading the file README, and you already have a README in your local directory, you'll want to give a different local-filename so that the first one isn't overwritten.
For our example, to download the file README, we simply use