Managing Systems and Workgroups: A Guide for HP-UX System Administrators
Configuring a Workgroup
Adding PC/NT Systems into the Workgroup
Chapter 4 423
a. For ASCII (plain text) files, set the transfer mode using ftp’s ascii
command:
ftp> ascii
This enables character conversions such as end-of-line carriage
return stripping to occur (See “ASCII End-of-Line Problems” on
page 132).
b. For binary files (graphics files, sound files, data base files, etc.), set
the transfer mode using ftp’s binary command:
ftp> binary
This causes ftp to use an eight-bit-wide (byte) transfer rather than a
seven-bit-wide (character) transfer. This is very important as most
non-ASCII formats are dependent on that eighth bit of each byte.
Your binary files will be corrupted if you transfer them using ascii
mode.
TIP If you are unsure of the format of the file you are transferring (ASCII
or binary) set the file type to “binary”. ASCII files will not be
corrupted if transferred in binary mode; however, end-of-line
character stripping will not occur (See “ASCII End-of-Line Problems”
on page 132).
Step 3. Transfer the file using ftp’s get command.
Example 1: to retrieve the ASCII file “phone.dat” (located in the
subdirectory called “data”, under the
ftp-root
directory) from the PC:
ftp> cd data
ftp> ascii
ftp> get phone.dat
Example 2: to then retrieve the graphics file “net2.jpg” from the
subdirectory called “pics” (located under the
ftp-root
directory):
ftp> cd ../pics
ftp> binary
ftp> get net2.jpg