Managing Systems and Workgroups: A Guide for HP-UX System Administrators
Configuring a Workgroup
Adding PC/NT Systems into the Workgroup
Chapter 4 431
a. For ASCII (plain text) files, set the transfer mode using ftp’s ascii
command:
ftp> ascii
This enables character conversions such as those that handle the
differences between how the ends of lines are handled between
differing types of operating systems (See “ASCII End-of-Line
Problems” on page 132).
b. For binary files (graphics files, sound files, database 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 handling
will not occur (See “ASCII End-of-Line Problems” on page 132).
Step 3. Transfer the file using ftp’s send command.
Example 1: To send the ASCII file phone.dat (located in the
C:\office_stuff directory on your PC) to your HP-UX system:
ftp> lcd C:\office_stuff
ftp> ascii
ftp> send phone.dat
— OR —
ftp> ascii
ftp> send C:\office_stuff\phone.dat
Example 2: To send the graphics file roadmap.jpg from the current
working directory:
ftp> binary
ftp> send roadmap.jpg