Transferring information to another computer
Choices
- getting vs. putting
- individual file vs. multiple files
- the medium
- floppy disk
- zip disk
- CD
- modem
- ethernet
- archiving/compressing in Unix
1. getting vs. putting
If you can put a file in a web directory on a web server
(and make sure the file & directory are world-readable),
then any browser (e.g., Netscape, Explorer) anywhere on the
web can download ("get") that file.
You have to know its URL -- web address
(http://xxx)
-- and then you can view the file and/or save it.
``Anonymous ftp'' is no longer common, but it is another
protocol by which one could get files from a cooperating
server but usually not copy files onto the server.
Email is sometimes the way to go; you can send a file
as an attachment in an email message to yourself at another destination.
Often this is too indirect and time-consuming to be practical.
Otherwise, transfer methods tend to be symmetric;
ftp and sftp and scp programs
can usually "get" files as easily as they can "put".
2. individual file vs. multiple files
Using the network, it is often more difficult to transfer multiple
files than to transfer a single file. On Unix systems you can
simplify things by archiving multiple files into a single file
using tar and then compressing that file (with gzip)
so that it is smaller and quicker to transfer.
(On Macintosh computers use hfstar instead;
it also archives the ``resource fork'' of files,
unlike plain tar.
Download.)
On other computers
there are similar utilties like Zip and StuffIt.
Examples for tar+gzip
are at the bottom of this page.
3. the medium
You can use ``sneakernet'' to transport data; put your
files onto a floppy/zip/CD, put on your sneakers, then
run the disk over to the other computer, in person...
Or, sit at the computer console and transport the data
remotely over phone lines (modem) or higher-speed
cables (ethernet):
floppy disk:
floppy disks carry up to about 1MB. They
are old technology, and many new computers
do NOT support floppy disks.
This should be last resort only.
ZIP disk:
This is one successor to the floppy disk;
made by Iomega®,
it is only a bit thicker than a floppy
yet holds up to 100MB (or 250MB).
But only a fraction of
computers out there will do ZIP disks;
the ITS lab computers do, but that is
uncommon in the rest of the world...
Also, a ZIP disk costs $10.
CD:
Newer computers can write to a CD,
not just read ("CD-ROM"). If you have
a special writeable CD ("CD-R") and a
computer with a CD-R drive, this is
sometimes the way to go. CD-R disks are
not expensive (25¢-50¢ apiece)
and hold up to 650MB and are
impervious to magnetic fields.
This is especially good if you want to
archive files in addition to merely
transferring them.
Even better are CD-RW -- rewriteable
CDs. CD-RW disks are more expensive than
CD-R and a computer CD-RW drive is more expensive
than a CD-R drive, but not by terribly much,
and with CD-RW you can erase information and
use the same disk for 650MB of new stuff.
A CD-RW can be reused 1000 times; it doesn't
get old as fast as floppies or ZIP disks.
modem:
The top speed for a modem tends to be about
56K, which means that you can transfer a
maximum of 7KB per second. For smallish
files this is OK, but downloading or transfering
a 10MB file takes at least half an hour,
if your modem connection is stable enough
to last that long...
DSL is about ten times as fast, which makes
a lot of difference; that 10MB file now takes
only 3 minutes to transfer.
ethernet:
Ethernet connections run at higher speeds,
10Mbps or 100Mbps, which makes it possible
to transfer huge files in seconds.
4. tar and gzip
     
-- Unix file archiving/compressing
Suppose you have three files named file.1 and
file.2 and file.3. To make a single ``archive''
file which contains all three, use tar: e.g.,
newton> tar cf newfile.tar file.1 file.2 file.3
This will create a new file (be sure to name it using the .tar
suffix) which contains all three original files, and whose size
is slightly more than the sum of the original files' sizes.
If the three files were all in a subdirectory named mysubdir,
the following command would create a single tar file which
would contain that subdirectory including all its contents:
newton> tar cf newfile.tar mysubdir
Then, you can try compressing the tar file using gzip,
e.g.,
newton> gzip newfile.tar
This will create a new file named newfile.tar.gz
which may or may not be significantly smaller than the original.
Text files compress well; image files and MP3 files don't
because they are generally compressed already.
You can transfer the single file, newfile.tar.gz, to
another computer by one of the methods above. On the new
computer one can run the command
unix> gunzip newfile.tar.gz
to re-inflate the compressed file and produce newfile.tar.
Then the following commands can be used:
unix> tar tf newfile.tar
unix> tar xf newfile.tar
The first command is always harmless;
it only shows a list
of the files included in the tar file.
The second command actually restores (extracts) the
original files and should be used with care;
it will restore the original files
(file.1, file.2, file.3),
overwriting any files of the same name if there
were any before.
If in doubt,
a safe strategy is to create a new empty subdirectory
in which you can run the tar xf command,
then move the individual restored files to appropriate
destinations with separate commands.
(It's not always necessary to be so cautious,
if you remain aware of what you are doing.)