Skip to content

News Feedback Submit a Problem Hours and Info glossary its home
  Link icon Internal Use
You are here: Home » General Computing » File Transfers » How To » Command Line FTP

Command Line FTP

What is it?

All Unix, Linux, Windows NT, 2000, XP and Macintosh OS X computers come ready to FTP... via the command line. What's the command line, you may ask? Harkening back to the dawn of computing, when there was no such thing as point and click, everything was done by typing commands at a prompt. What many people don't realize is that method of using your computer still exists. Most of your normal computing tasks can be done from a command prompt, if you know the proper commands to type!

How do I send files using command line FTP?

  1. First you need to get to a command or terminal prompt. In Windows you can usually do this by going to start, choosing run and then typing command. In Mac OS X go to 'Applications' and then 'Utilities' and double click on 'Terminal'.
  2. At the prompt, type ftp and hit enter or return on your keyboard.
    screen shot

  3. At the FTP> prompt, type open and then the full hostname of the computer you want to connect to. In my example below I connected to an imaginary computer called 'hostname' on the 'university.org' network. And again, hit enter or return on your keyboard.
  4. If the ftp site requires a password, it will now ask you for the username. Type in the username or login name for that particular computer (Not your regular Case username!) and then hit enter on your keyboard. Now it will ask for the password. Note the password will not show up when you type it, no asterisks or anything, the cursor just sits there blinking like you're not doing anything. Hit enter or return on your keyboard.
    screen shot

  5. If you mistyped your password (easy to do since you can't see how many characters you type!) it will give you an error, just type bye and start over again. For example, if I typed my username as 'blah' instead of the proper 'guide', it will also give me the login incorrect error.
    screen shot

  6. There! You're in, now what? Well, you can see all the files and folders in the directory you are in by typing dir. If you want to go into another folder you can type cd followed by the name of the folder. In the example below I typed 'cd folder' to go into a folder that was creatively named 'folder'.
    screen shot

    Here's a brief explanation of what you're looking at when you type 'dir'.
    screen shot

  7. If I want to get one of these files off of the other computer and put it on my computer, I would type get plus the filename. For example, since I love Danny Kaye's music, I type 'Get DannyKaye.mp3' to download that file. Note Capitalization counts! If I want to put a file from my computer onto the ftp site, I would type put plus the filename. For example I want to put a song by old Blue Eyes on the server for later so I type 'put BingCrosby.mp3'. (You can change the name of the file as well! if I typed 'put Bing.mp3' it would rename the file Bing. You have to have 'gotten' the file before you can 'put' it. Also some computers will require you to say the coding you want to use such as 'ftp> binary', 'ftp> ascii' for plain text or 'ftp> tenex'.)
  8. To leave, just type bye or quit. You can also type disconnect if you'd like to ftp to a different computer instead of exiting completely. When you're done, close the terminal window. (You can usually 'exit' the terminal window as well.)
    screen shot

November 22, 2009

The ITS Help Desk is OPEN.