Main Content

FTP - how to make the right transfers

Archive - Originally posted on "The Horse's Mouth" - 2005-09-01 18:12:01 - Graham Ellis

If you're transfeerring files from one computer to another, you'll probably use an FTP client program - either something with a GUI or the FTP command itself on your local machine, and that will talk to an FTP daemon on the server.

It's important to note that you need to navigate to the right directory on your local system AND the right directory on the remote system before you transfer the file, and that you know what the file to be transferred is named at the source AND what it will be named at the destination. Many an error has been made by getting it wrong at one end of the other, or by "put"ting when you meant to get, or "get"ting when you meant to put.

If you're a newcomer or rare user, here the scheme we use to FTP transfer files that keeps it as easy as possible ...

1. Use commands on your LOCAL workstation to navigate to the directory from / to which you wish to transfer

2. Establish an ftp connection to the remote machine

3. Use cd and ls to move and look around on the REMOTE machine and navigate to the directory from / to which you want to transfer there.

4. Use the put command to transfer file(s) to the remote machine, and / or the get command to transfer files from the remote machine

5. Leave ftp using the quit command.

Example of the commands you might enter:

1.
cd backups

2.
ftp 192.168.200.66
trainee
abc123

3.
cd /etc/httpd/conf
ls

4.
get httpd.conf

5.
quit

Other things to remember ....

a) If your transferring files between Linux (or Unix) and Windows systems, you MUST ensure that you're in Binary mode if you're transferring binary files and ASCII mode if you're transferring text files. The easiest way to do this is to type ascii or binary before you do your put or get.

b) File names are case sensitive on Unix and Linux systems, but case insensitive on Windows.