link to content
Essentials at NC State Home
Help | ResNet | Computing@NC State | For OIT Staff | Publications | Search NC State | Feedback
your unity account
antivirus & security
email & messaging
connections & labs
your computer
software@nc state
files
web pages
education & training
publications
other resources
troubleshooting
ITD Sections

Secure file transfer in a command line (non-graphical) environment

If you don't have access to a graphical secure file transfer program such as WinSCP or Fugu, you can transfer files in a command line environment. You will need to type a series of commands instead of using drag and drop.

From a Unix workstation on campus

  1. Log in to the Unix workstation with your Unity ID and password.
  2. An xterm window should appear, with a "unity%" prompt.
  3. Type: ftp ftp.ncsu.edu
    This connects you to the server that you will use to transfer files to or from your Unity Home folder.
    (NOTE: If you want to connect to a server elsewhere, replace ftp.ncsu.edu with the name of that server, e.g., ftp.microsoft.com. The text you subsequently see in the xterm window will differ from what is given below, and you will probably need to log in as "anonymous" or "guest," using your email address as your password.)
  4. You should see the following 2 lines:
    Connected to ftp.ncsu.edu
    220 North Carolina State University - Unity FTP Server
    followed by this prompt:
    Name (ftp.ncsu.edu: unityid):

    where unityid is your Unity ID.
  5. Type in your Unity ID.
  6. The following two lines should appear:
    331 Password required for unityid
    Password:
  7. Type your Unity password.
  8. You should then see these two lines:
    230 User unityid logged in.
    ftp>
  9. You are now in your Unity Home directory. To verify this, you can type ls at the "ftp>" prompt to see a list of the files and folders in your directory.
  10. To transfer a binary file (e.g., Web page, spreadsheet or anything other than plain text), type either binary or bin at the "ftp>" prompt. To return to text mode after you have finished a binary transfer, type ascii at the prompt.
  11. Use the FTP commands below to browse your file structure and transfer files.
  12. To get more help with FTP in Unix, type man ftp at a "unity%" prompt.

From off campus to your Unity home directory in AFS (Windows XP)

  1. On a Windows XP machine, go to the "Start" menu.
  2. Choose Run.
  3. At the prompt, type ftp.
  4. In the "C:\WINDOWS\system32\ftp.exe" window that appears, type:
    open ftp.ncsu.edu
  5. Two lines should appear, indicating that you are connected and identifying the server:
    Connected to ftp.ncsu.edu
    220 North Carolina State University - Unity FTP Server
  6. On the next line you should see this prompt:
    User <ftp.ncsu.edu:<none>>:
  7. Type your Unity ID.
  8. You should then see the following two lines:
    331 Password required for unityid.
    Password:

    where unityid is the Unity ID you entered earlier.
  9. Type your Unity password.
  10. You should see these two lines:
    230 User unityid logged in.
    ftp>
  11. The screen should now be similar to the graphic below, indicating that you are logged in.



  12. You will be in your Home directory in your Unity file space. To verify this, you can type ls at the "ftp>" prompt to see a list of the files and folders in your directory.
  13. To transfer a binary file (e.g., Web page, spreadsheet or anything other than plain text), type either binary or bin at the "ftp>" prompt. To return to text mode after you have finished a binary transfer, type ascii at the prompt.
  14. Use the FTP commands below to change to the desired local directory and remote directory.
  15. Type the appropriate command (get, put, mget, mput) to transfer a file between directories.
  16. If FTP has been successful, you will get a message telling you the number of bytes transferred.
  17. When you are finished, type bye at the "ftp>" prompt to end the session.

FTP commands

In the commands below, be sure to replace filename and extension with the name of an actual file or extension.

pwd Show the name of the current directory.
ls List the contents of the current directory.
cd Change to a different directory.
For example:
cd econ_project
put filename Transfer a file from your local site to your remote site.
For example:
put vacation.html
mput *.extension Transfer all files having the same extension from your local site to your remote site. For example, mput *.doc will transfer all local .doc files to the remote site.
get filename Transfer a file from your remote site to your local site.
For example:
get zoology_data.xls
mget *.extension Transfer all files having the same extension from your remote site to your local site. For example, mget *.txt will transfer all remote .txt files to the local site.
bye End the ftp connection and exit your session.


For additional information on Unix commands, see a list of the ones most used or a more comprehensive list.

If you need more help with file transfer, contact the NC State Help Desk.

Go to the Secure File Transfer at NC State page.

 

Last modified  January 10, 2007 by cawalker

jump to content
jump to content Go to page top Page Top | OIT | PolicyDisclaimer