Next: Using xftp Up: Transferring Files in RCS Previous: Transferring Files in RCS

Using ftp From a Command Line

Using ftp from a command line works whether you're sitting at an RCS workstation or are logged in remotely. If you're logged in remotely, the files you obtain are saved to your RCS account, not to your personal computer. (If you have an Ethernet connection, you can use software such as PC/TCP to transfer files directly to and from your personal computer.)

At a UNIX prompt, enter

replacing hostname with the name of the host from which you wish to get a file. For example, if you want to access a host called sample.com, you would enter the command ftp sample.com. In a few seconds you should see a message saying you are connected to the host. A prompt will appear, asking you for your name or userid. If you are accessing an account you own, enter the appropriate userid. If you are accessing an anonymous ftp site, enter the name anonymous.

Some sites have a lot of people trying to connect during business hours, so they either restrict access to a certain number of connections or allow access only during certain hours. If you reach such a site, there might be a message asking you to try again later.

If you make a connection, the host will prompt you for a password. If you have an account on that host, enter your account password. If you're using anonymous ftp, enter your entire electronic mail address. (For example: renssj@rpi.edu)

Once you are connected, you should see an ftp > prompt, although the exact prompt may vary from one server to another.

You can now use the cd (change directory) command to reach the directory that contains the file you want. You can use the ls or dir commands to view the files in the current directory.

Once you've located the file you want, determine whether it's a text file or a binary file. Text files contain plain text. Binary files contain things like graphics or compiled programs.

Enter the command text or binary to set the right kind of transfer mechanism.

To retrieve the file, enter the command

replacing filename with the name of the file you wish to retrieve. If you want the file to have a different name in your own directory, use the command get filename filename-new. For on-line help, enter a question mark (?).

When you're done with the file transfer, enter the command bye at the ftp> prompt. For more information, please refer to Memo RPI.117, Transferring Files: Using FTP in UNIX.



Next: Using xftp Up: Transferring Files in RCS Previous: Transferring Files in RCS


Send comments to consult@rpi.edu