Transferring Files
This article is composed of the following sections:
- Overview -- read me first
- Transferring between two Unix accounts
- Downloading files to your home computer
- Uploading files from your home computer
- Transferring files to/from an ACS Macintosh
- Transferring files to/from an ACS Windows XP computer
- Transferring files between a PC diskette and Macintosh
- Special note for UNIX <-> PC file transfer
Overview
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. This overview article can help you decide which case applies to your situation and guide you to the correct help articles.
In any case, there are two important terms to know:
Download
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
Upload is the opposite of download. It is the action of sending a file to a remote location.
What Files are Available Where?
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.
- Your Home Computer
- This is the tricky part. We don't know what is installed on your home computer, so we can't tell you exactly what to do.
- The good news is that you can easily install a new tool that will solve your file transfer needs. The names of some common programs for transferring programs are listed in parenthesis next to the service they provide. You can download these and install them on your home computer, and use them to transfer your files. Programs for Macs are colored blue, and programs for Windows are colored red.
- CIFS Storage
- Also Known As:
- Windows XP 'My Documents' folder
- Windows XP Desktop
- Mac OS X Home Directory
- These files are located on the Active Directory storage space, and can only be accessed by logging in directly to the Windows XP or Mac OS X computers.
- Note also that the Mac OS X Home Directory is located inside the Windows XP 'My Documents' folder.
- Also Known As:
- UNIX Home Directory for personal or class account
- This is space on your mail server, for saving messages, files, and creating a web page.
- Also Known As:
- 'Home Directory' folders in Class Resources folder, under Windows XP
- Can be accessed using:
- SFTP, FTP (Fetch, WS-FTP, CuteFTP)
- Class Resources folder on ACS Windows XP and Mac OS X computers
- ACS-Webmail stores its messages here
- Samba (Windows/Mac OS X File Sharing)
- cphome (an ACS tool for moving your home directory between two ACS computers)
- SSH (PuTTY, MacSSH, any UNIX terminal)
- SCP (A Unix command line utility)
- UNIX OCE class allocation
Transferring between two Unix accounts
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.
*** Nota Bene ***: 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).
Downloading files to your home computer
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.
Uploading files from your home computer
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.
Transferring files to/from an ACS Macintosh running OS 9
Macintosh computers in ACS labs have an application called "Fetch" which can be used to transfer files between the Macintosh and a Unix account. Fetch is a FTP program for the Macintosh, but with buttons and menus instead of type-in commands.
Fetch is in the Communications folder on the main hard drive. Double-click it to launch. There is on-line help available; select "Fetch Help" from the Balloon Help menu to get to it (you may need to Cancel the initial dialog box first).
Transferring files to/from an ACS Windows XP computer
Windows XP computers in the ACS 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:
- Log in to the windows XP computer using your username and up to 8 characters of your password
- Double click on the "Class Resources" icon on your desktop
- Look for the icon that represents the unix space you want to connect to. For example, If you would like to put files in your Internet-sharable public_html directory, which is under your home directory, look for the icon whose name ends in "home directory on sdcc17", where sdcc17 should be replaced with the server where your account resides (e.g. your mail server).
- Double click on that icon. You may need to enter a password. If you do, be sure to check which username whose password it wants. This will be listed in the "Username" box of the connection window.
- The connected file space will then open in a new window, which works just like a floppy disk.
Transferring files between a PC diskette and Macintosh
It is useful to know that most cross-platform applications such as Microsoft Word and Excel can use the same documents from either platform. For example, you can create a document in MS Word for Windows, copy it to a Mac, then load it directly into MS Word for the Macintosh. (If you plan on taking a file created on an Macintosh and using it on a PC, you will need to find out what three-letter extension Windows expects the file to have. For instance, Excel files should be given names that end in '.xls', Word files should end with '.doc', and powerpoint documents should end with '.ppt'.)
With this information in mind, it is usually unnecessary to worry about file formats when transferring files from Mac to PC and vice versa. Putting your PC-formatted flash drive into a Macintosh computer, you should be able to access typical document types, even if they were created on a PC.
Viewing files on a PC-formatted flash drive is the same as viewing files from any Mac disk. Insert the drive into USB port and wait for a moment until a disk icon appears in a Finder window. Then double-click on the icon to view the contents of the flash drive. When you see the list of icons representing the flash drive's files, you can manipulate them as you like. To copy the files to the Mac, highlight the file(s) you wish to copy, and then drag them to the desktop or a folder.
Special note for UNIX <--> PC file transfer
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.

