Brigham Young University Homepage

Math Dept

Miscellaneous

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:

  1. To begin an ftp session, type ftp [hostname]. Examples: "ftp bert.cs.byu.edu" or "ftp ftp.netcom.com"
  2. 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.
  3. You are now free to change to the directory you desire using the "cd" command.
  4. If you want to receive files, type get [remote-file-name] [local-file-name]. Example: "get testfile.tst test.txt"
  5. If you want to send files, type put [local-file-name] [remote-file-name]. Example: "put test.txt testfile.tst"
  6. 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.

Maintained by Math CSRs
Copyright 2007. Brigham Young University, Provo, UT 84602. All Rights Reserved. XHTML CSS 508