Transferring computer files from one place to another is a rather broad topic. There are many methods available, some of which are exclusive of each other, and some of which may apply to more than one situation. Two important terms to know:
The action of bringing a file from a remote location to your current location. For example, if you are using your home computer, bringing a file from your Unix account to your PC is called "downloading" the file. Working with two Unix accounts, downloading a file from another account means bringing the file to the account you are currently working in.
Upload is the opposite of download. It is the action of sending a file to a remote location.
Transferring files between two computers consists primarily of recognizing that there exists some service that both computers can use.
Every student has many places that files can be stored. Knowing what files are stored where can help you make conclusions about which tools to use, when.
cphome -- Moving your entire home directory
There are times when one of your accounts may close, but another is opened for you. This is the case at the end of the quarter for course-specific accounts, or if you change your major and lose eligibility for an OCE account. cphome automates the process of moving your files from an old unix account to a new one.
See the help article for cphome for more information.
SFTP -- Secure File Transfer Protocol
When you know the machine names (eg, ieng9, sdcc13, etc.), the login names, and the passwords for the two accounts you wish to transfer files between, SFTP is the way to go. You start SFTP on one account, "connect" to your other account, and then can either upload ("put", in SFTP terminology) or download ("get") files. SFTP can also transfer multiple files at once, but CANNOT recursively copy an entire directory hierarchy in one fell swoop (i.e., it cannot copy an entire directory and all the subdirectories below it).
See the help article for sftp and "man sftp" for further details.
SCP -- Secure Remote Copy
SCP will copy a single file or directory with all its files and sub directories securely from one computer to another. If you need to copy many files, use SFTP, since SCP requires some advanced setup to avoid repeatedly typing in your password for each file. SCP is invoked directly from the command line and words very similarly to the regular "cp" command. SCP can also copy directory trees recursively.
See the help article for SCP and "man scp" for further details.
Mail -- using email programs to transfer files
You can use a unix mail program to attach a file to an email and send it to another account. Attaching a file and emailing it in this manner is especially useful if you do not know the passwords for both accounts (e.g., mailing a file to a friend or colleague). You can send both text files and binary files through a program such as Pine with no trouble.
The file you wish to send should be located somewhere in the account from which you're sending the email. Start Pine, and then compose a new message by pressing 'C'. Then type CTRL+J, and Pine will ask you for the name of the file you wish to attach. Type its name, or type CTRL+T, which will take you to a list of files in your home directory. After you've entered/selected the correct file name, and composed an accompanying email, send the message with the usual CTRL+X command, and the file will be sent along with the mail.
Note: Make certain that the recipient of the file can view whatever you are sending. Many files cannot be opened except by the same program that created them. Don't assume that the person will have the correct viewer unless it's a general file type, such as a document (.doc).
FTP (File Transfer Protocol) Programs
In order to transfer files on your home computer, you will need an SFTP or FTP program to handle file transfers. You can download and install such a program on a computer with internet access. There are many different programs available for the various computer operating systems. A recommended FTP program for Windows is WS_FTP (which supports Secure FTP transfers as well). For the Macintosh, Fetch works well. Both of these programs can be obtained for free from World Wide Web sites such as http://www.download.com.
The same software that can handle downloading files to your home computer can also handle uploading files from your home computer. See the section above for information about acquiring SFTP or FTP software.
Windows XP computers in the ACMS labs are capable of connecting directly to your UNIX disk space. In fact, your UNIX disk space may be connected automatically. To use your Unix disk space:
When text (ASCII) files are transferred files between a UNIX system and the PC via a BINARY transfer protocol which leaves the files completely unadulterated, frequently the results are unsatisfactory because the receiving system may complain about strange characters in the foreign- formatted file. BSD Unix users have two programs, dos2unix and unix2dos, which reformatted the plain text data from one machine into a version which can be easily read and manipulated on the other. The default mode of FTP is to transfer ASCII data, automatically correcting for the end of line differences at each end of the trasnfer. This is the suggested way to transfer ASCII (text) data.
Basic usage for the programs is as follows
dos2unix file file unix2dos file file
On sdcc13, or sdcc17 the programs are called dos2bsd and bsd2dos, respectively.