FAQ: How to send files from a Unix server to my PC?

There are many ways you can do this. As many other problems in computer science, there are usually more than one solution:
  1. Secure Copy (scp) - This is the recommended way.
  2. Samba - If the server enabled Samba, this is convenient because you can use it as a network hard disk.
  3. Mail

Secure Copy (SCP)

  1. Visit the PuTTY webpage, download the program pscp.exe (PuTTY scp).
  2. Suppose the IP address of your Unix server is 163.22.17.162, and your file name is "hw01.py", you can download the file by
    pscp username@163.22.17.162:hw01.py .
  3. If you want to upload a file, type the following command:
    pscp hw01.py username@163.22.17.162:.
    On the server you may run the command "ls" to verify the file is uploaded.

Mail it back

  1. Make sure you have Created Mail Filters so that your mail server will not dispose mails from STU as spam.
  2. Suppose the file you want to send back is "hw01.py".
  3. After you login to the Unix server, type the command "echo HW01 | mutt -s HW01 s1053210xx@mail1.ncnu.edu.tw -a hw01.py".
  4. Normally you will not see any message. The file is silently mailed to your mailbox. This is the convention of Unix. If everything works fine, it says nothing. When you see some messages, most of the time this implies there are warnings/errors.
  5. Now you can see the file "hw01.py" in your mailbox. Save the attached file in your local hard disk, and submit it to Moodle.