Commandline FTP in OS X Tiger
FTP (File Transfer Protocol) is a system that has been implemented with a wide variety of user-interfaces, all of which fundamentally perform the same set of tasks: copy a file from some other computer to your own, copy a file from your computer to some other one, and a set of miscellaneous tasks that help facilitate the copying. This document is intended for use as an overview of FTP in general, using the commandline FTP interface that comes pre-installed with the OS X Tiger operating system.
-
Opening commandline FTP
To open an FTP session, open your hard drive, then the Applications folder. In the Applications folder there should be a Utilities folder. Open it, and double-click "terminal." This will open a commandline session. Type "ftp ftp.sonic.net" to initiate your connection to the Sonic.net FTP server.
You will be prompted to provide your Sonic.net username. Type in your Sonic.net account name (without "@sonic.net" at the end), and hit enter.
You will be prompted to provide you password. Please note that the FTP interface will not "echo" this, so you will be shown no indication of what you have typed for your password. As always, Sonic.net passwords are case sensitive.
Note: email-only accounts do not have full access to our FTP server. If you do not have the password for your parent account, you can still download some files by using the username "anonymous."
-
Changing directories
FTP servers use a directory structure, with individual files stored inside directories, some of which are contained by parent directories. Navigating the directory structure uses the "cd" command. To navigate to the "/pub" directory, type "cd /pub" and hit enter. The FTP server should return a "250 CWD command successful" code (example).
Sometimes it is useful to confirm which directory you are currently in. To do this, type "pwd" and hit enter. (example).
-
Getting a file
To copy a file from the remote server to your own computer, use the "get" command. Many files are "binary" files, such as images, audio, and video. By default, the OS X Tiger FTP client using Binary mode.
To ensure that you are downloading precisely the right file, it is useful to obtain a listing of the files in your current directory. Type "ls" and hit enter. The FTP server shoudl return a listing of all the files in your current directory (including subdirectories), then a "226 Transfer complete" code (example).
The command to get a file is simply "get." Type "get filename" and hit enter to start copying. The FTP server should return a "150 Opening BINARY mode data connection for filename" code upon beginning the transfer, and a "226 Transfer complete" code upon completion. This will be followed by a summary of how many bytes were transferred, the amount of time the tranfer took, and a measure of how fast the transfer was (example).
If you would like the file you are receiving to be written to a particular directory on your computer, you can use the syntax "get filename localdirectory" (not including the local directory will result in the file being placed in a default directory, typically /users/your OS X Tiger account name/").
-
Putting a file
To copy a file from your computer to the remote server, use the "put" command. As with the get command, many files are "binary" files, such as images, audio, and video. By default, the OS X Tiger FTP client uses Binary mode.
The command to put a file is "put." Type "put filename" and hit enter to start copying. The FTP server should return a 150 Opening BINARY mode data connection for filename" code upon beginning the transfer, and a "226 Transfer complete" code upon completion. This will be followed by a summary of how many bytes were transferred, the amount of time the tranfer took, and a measure of how fast the transfer was (example).
If the file you were copying to the server was not located in your default directory, it will be necessary to specify the full path. This will looksomething like "put /directory/subdirectory/filename." You can determine the full directory path that precedes the filename in Windows by opening the folder that contains it and looking for the "address" bar near the top of the window.
-
Closing FTP
When you are finished, you can exit FTP by issue the command "bye." Simply type "bye" and hit enter. The FTP server should issue a "221 Goodbye" code and return you to your Windows commandline or your desktop, depending on how you initially opened the FTP program (example).



