A few of the most frequently-used FTP commands appear below to get you started. The sample terminal session in the next section of this document illustrates the use of some of these commands.
Please note that you should enter the commands given below at the ftp> prompt.
open hostname
Establishes a connection to the FTP server on the specified host.
Example: open ftp.rpi.edu
help command
Prints a short explanation of the command you specify. (If you enter help without specifying a command, you will receive a list of the commands available in FTP.)
Example: help user
user accountname
Identifies you to the remote FTP server. If the remote server requires a password, it will prompt you for it. You will need to use this command, for example, if you mistype your account name at the ``Name'' prompt.
Example: user liberz
ls
Lists on your screen the names of files contained in the current directory on the remote system. The dir command has the same function.
Example: ls
Using the ls -al command will also list all of the various ``dot" files in the current directory, much like the .xrc and .mailrc files in your home directory on RCS. This command will also give you additional information, such as file size, etc.
dir
Equivalent to the ls -al command.
pwd
The pwd command, which stands for ``print working directory," indicates the directory in which you're currently located.
get remote-file local-file
Transfers the file called remote-file from the remote host to the file called local-file in the current RCS directory. If you do not specify local-file, this command will transfer the file to one of the same name in the current RCS directory. Please note, however, that it will overwrite an existing file having the same name, without asking for confirmation, so use this option carefully.
Example: get data.txt mydata.txt
put local-file remote-file
Transfers the RCS file called local-file in the current directory to the file called remote-file on the remote system. If you do not specify remote-file, this command will transfer the file to one of the same name on the remote system. Similar to the get command above, however, this command will overwrite an existing file having the same name on the remote system, without asking for confirmation.
Example: put mydata.txt yourdata.txt
close
Terminates the FTP session with the remote server, and returns to local FTP command mode.
Example: close
quit
Stops the FTP session with the remote server and exits FTP.
Example: quit