Content | Navigation |

Internet File Transfer Using FTP from UNIX

FTP is the user interface to the ARPANET standard FileTransfer Protocol. The program allows you to transfer files to and from a remote site on the Internet. Use the following procedures to transfer files with FTP:

Getting started:

<menu>

  • Log on to a computer running UNIX-any HECN system-that has ftp available.

</menu>

Connect to the remote computer by typing:

  1. Choose the menu option for Uploading and Downloading to and from your host system.Choose to use FTP to upload or download.
  2. You will be prompted for the host name of the computer you are trying to connect to, such as archive.orst.edu. If the connection is successful you will be prompted to enter a logon id and password. After you have logged in, you will see the ftp prompt, ftp>.
  3. Note: Some computers have guest logon ids. If you do not have a logon id on the remote computer you may try a logon id of anonymous and your-email-address (e.g., logonid@plains.nodak.edu) for a password. Some systems require ANONYMOUS to be capitalized.

To see files that are available on the remote computer:

Use the ls subcommand. Type: ls (press enter). You may need to use the cd subcommand to change to a different directory on the remote machine. The format of the cd command is: cd remote-directory (press enter), where remote-directory is the directory on the remote computer to change to.

For example, on archive.orst.edu you will need to change to the public directory pub before transferring files. To do this, type: ls (press enter). You will see pub listed as a directory. Now change to the directory pub by typing: cd pub (press enter). Use the ls command again to list the contents of the directory, pub.

Transfer your files

  1. To transfer files, you must first identify the type of file you are transferring. The default file type is text or ascii. To transfer binary files, at the ftp> prompt, type: binary (press enter) Note: Some computers (such as simtel20.Army.mil) require the transfer type to be set to tenex in order to transfer binary files. You may change the transfer type from binary to text by typing: ascii (press enter).
  2. The hash subcommand causes a '#' to be displayed on your screen for every 1024 bytes transferred. This subcommand is very useful for monitoring the progress of your file transfer. Hash is a toggle subcommand (typing it once causes the '#' to be displayed; typing it a second time suppresses the '#'). You may enter the hash subcommand any time before you issue a get or put subcommand.
  3. To abort a file transfer, hold down Ctrl and press c.
  4. To receive a file from the remote computer, type: get filename (press enter) where filename is the name of the file on the remote computer.
  5. To send a file to the remote computer, type: put filename (press enter) where filename is the name of the file on the local computer.
  6. Note: You will probably not be able to send files to computers that you have logged into with an id of anonymous.

To exit from FTP

  • Type: quit (press enter)

For on-line help information on the ftp command, from UNIX

  1. Type: man ftp (press enter)
  2. Once you have the ftp> prompt, you may obtain a list of subcommands by typing: help (press enter)
  3. For help on individual subcommands, at the ftp> prompt, type: help subcommand (press enter) e.g., help hash.

Internet File Transfer Using FTP from UNIX

FTP is the user interface to the ARPANET standard FileTransfer Protocol. The program allows you to transfer files to and from a remote site on the Internet. Use the following procedures to transfer files with FTP:

Getting started:

<menu>

  • Log on to a computer running UNIX-any HECN system-that has ftp available.

</menu>

Connect to the remote computer by typing:

  1. Choose the menu option for Uploading and Downloading to and from your host system.Choose to use FTP to upload or download.
  2. You will be prompted for the host name of the computer you are trying to connect to, such as archive.orst.edu. If the connection is successful you will be prompted to enter a logon id and password. After you have logged in, you will see the ftp prompt, ftp>.
  3. Note: Some computers have guest logon ids. If you do not have a logon id on the remote computer you may try a logon id of anonymous and your-email-address (e.g., logonid@plains.nodak.edu) for a password. Some systems require ANONYMOUS to be capitalized.

To see files that are available on the remote computer:

Use the ls subcommand. Type: ls (press enter). You may need to use the cd subcommand to change to a different directory on the remote machine. The format of the cd command is: cd remote-directory (press enter), where remote-directory is the directory on the remote computer to change to.

For example, on archive.orst.edu you will need to change to the public directory pub before transferring files. To do this, type: ls (press enter). You will see pub listed as a directory. Now change to the directory pub by typing: cd pub (press enter). Use the ls command again to list the contents of the directory, pub.

Transfer your files

  1. To transfer files, you must first identify the type of file you are transferring. The default file type is text or ascii. To transfer binary files, at the ftp> prompt, type: binary (press enter) Note: Some computers (such as simtel20.Army.mil) require the transfer type to be set to tenex in order to transfer binary files. You may change the transfer type from binary to text by typing: ascii (press enter).
  2. The hash subcommand causes a '#' to be displayed on your screen for every 1024 bytes transferred. This subcommand is very useful for monitoring the progress of your file transfer. Hash is a toggle subcommand (typing it once causes the '#' to be displayed; typing it a second time suppresses the '#'). You may enter the hash subcommand any time before you issue a get or put subcommand.
  3. To abort a file transfer, hold down Ctrl and press c.
  4. To receive a file from the remote computer, type: get filename (press enter) where filename is the name of the file on the remote computer.
  5. To send a file to the remote computer, type: put filename (press enter) where filename is the name of the file on the local computer.
  6. Note: You will probably not be able to send files to computers that you have logged into with an id of anonymous.

To exit from FTP

  • Type: quit (press enter)

For on-line help information on the ftp command, from UNIX

  1. Type: man ftp (press enter)
  2. Once you have the ftp> prompt, you may obtain a list of subcommands by typing: help (press enter)
  3. For help on individual subcommands, at the ftp> prompt, type: help subcommand (press enter) e.g., help hash.

Student Focused. Land Grant. Research University.

Follow NDSU
  • Facebook
  • Twitter
  • RSS
  • Google Maps

North Dakota State University
IT Help Desk Phone: +1 (701) 231-8685
Administrative Calls Only: +1 (701) 231-7961 / Fax: (701) 231-8541
Campus address: Quentin Burdick Building 206
Physical/delivery address: 1320 Albrecht Blvd, Fargo, ND 58102
Mailing address: NDSU Dept. 4510 / PO Box 6050 / Fargo, ND 58108-6050
Page manager: Information Technology Services

Last Updated: Thursday, February 20, 2014 11:11:04 AM