You can transfer text files, graphics files, and programs between computer accounts on different computer systems using Internet file transfer protocol (ftp). For example, you can transfer files between accounts you own on various Internet host computers. You can also transfer files to your account on RCS (Rensselaer Computing System) from public accounts on many remote hosts that allow you to log on without an account at that site. This is known as using anonymous ftp. You can use ftp from a UNIX command line (by issuing a command at a UNIX prompt), or you can use a program called xftp, a graphical ftp package, on an RCS workstation.
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, which contains plain ASCII text, or a binary file, which can contain things like graphics or compiled programs.
Enter the command text or binary to set the appropriate kind of transfer mechanism.
To retrieve the file, enter the following command at the > prompt, 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
For on-line help, enter a question mark (?). When you're done with the file transfer, enter the command bye or quit at the ftp > prompt. For more information, please refer to Memo RPI.117, Transferring Files: Using FTP in UNIX.
![]()
xftp is a graphical interface to the file transfer program available on RCS. To use it, you need to be logged into an RCS workstation in an on-campus computer lab. To start the software, enter the command xftp & from a UNIX window. An introductory screen will appear and disappear, and then the main xftp window will appear. The window shows information about the computer host you are currently attached to, on the left side, and will show information about the computer host you will attach to, on the right side. On the side that is not connected to a host (Not Connected is displayed on that side of the window), left-click on the Connect menu. Select Connect to Remote from the drop-down menu that appears.
A new window will appear, displaying hosts you have recently accessed, and displaying fields in which you can type a new host name and a user name. You can left-click on a recently-accessed host to reconnect to it, or you can enter the full host name in the host field (such as sample.com). Enter your userid in the User Name space if you own an account on the host, or enter anonymous. If you enter your userid, the system will prompt you to enter your password. Left-click on the Connect button. xftp may take some time to establish a connection with the remote host. A window will appear, asking you for a password. If you have an account on the host, enter your account password. If you're accessing a public site, enter your entire electronic mail address. The characters you type are masked with other symbols to keep your password secure. One you are connected, the remote host's name and file names appear on the right side of the xftp window. You can use the Dir menu to change to different directories in the remote host or your own local host. (There are identical menus on both sides of the window - one affecting the local host and the other affecting the remote host.)
To send a file back to your own account, left-click on the file or directory name you want to copy from the remote host. Then, left-click on the ASCII or Binary button in the middle of the window. Text files are ASCII and graphics and compiled programs are usually binary. Left-click on Copy or Rcopy to copy a file or an entire directory, respectively, to your account. For more help, left-click on the Help menu at the top right corner of the window. To quit xftp, left-click on the File menu, then left-click on Quit.