FTP Tutorial Page
The "ftp" command is the user interface to the ARPANET standard File
Transfer Protocol. It allows the user to transfer files to and from a
remote network site.
To use ftp:
- To begin an ftp session, type ftp [hostname]. Examples: "ftp bert.cs.byu.edu" or "ftp ftp.netcom.com"
- This will connect you to the remote host. If you have an account on
that host, you can now login as usual. If not, you can generally login as
"anonymous" with your complete e-mail address as your password.
- You are now free to change to the directory you desire using the "cd"
command.
- If you want to receive files, type get [remote-file-name]
[local-file-name]. Example: "get testfile.tst test.txt"
- If you want to send files, type put [local-file-name]
[remote-file-name]. Example: "put test.txt testfile.tst"
- To exit, type "bye" at the ftp> prompt.
Other helpful hints:
- Try using ncftp. It is much nicer than plain old ftp.
- To append a local file to a file on a remote host, type append
[local-file-name] [remote-file-name]. Example: "append testfile.tst
test.txt"
- There are two modes of transfer: ascii (text) and binary. The default is
ascii. To change to binary mode, type "binary" at the ftp> prompt. To
change back to ascii mode, type "ascii" at the ftp> prompt.
- In addition to supporting the cd (change directory) command, ftp
supports delete (type "delete [remote-file-name]" to delete files), dir (type "dir" to list
directory members), mkdir (type "mkdir [remote-directory-name]" to make a
new directory), pwd (type "pwd" to show what directory you are currently
working in), and rmdir (type "rmdir [remote-directory-name]" to remove that
directory).
- To open a connection to a different ftp server while still at the ftp>
prompt, type "open [hostname]" and a connection will be established.
For more information, type "man ftp" from any UNIX workstation to see the
complete on-line documentation for ftp.