You may need to copy files
between computers. For instance, you can put a backup copy of an
important file you’re editing onto an account at a
computer in another building or another city. Dr. Nelson could put a
copy of a datafile from her local computer onto a central computer,
where her colleagues can access it. Or you might want to download 20
files from an FTP server, but not want to go through the tedious
process of clicking on them one by one in a web browser window. If
you need to do this sort of thing often, you may be able to set up a
networked filesystem connection; then you’ll be able
to use the Finder or local programs such as
mv. But Unix systems also have command-line tools
for transferring files between computers. These often work more
quickly than graphical tools. We explore them later in this section.
Mac OS X includes both
scp (secure copy) and
(remote copy) programs for copying files between two computers. In
general, you must have accounts on both computers to use these. The
cp, but also let you add the remote
hostname to the start of a file or directory pathname. The syntax of
each argument is:
hostname: is needed only for remote files.
You can copy from a remote computer to the local computer, from the
local computer to a remote computer, or between two remote computers.
scp program is much more secure than
rcp, so we suggest using
scp to transfer private ...