Managing Systems and Workgroups: A Guide for HP-UX System Administrators
Configuring a Workgroup
Adding PC/NT Systems into the Workgroup
Chapter 4424
On the HP-UX System - Sending a File to the PC
Once you have made a connection and logged in to the PC from your
HP-UX system (See “Establishing an ftp Connection from HP-UX to a
PC” on page 418) you are ready to transfer a file to the PC.
Step 1. Locate the file you want to send. You can use ftp’s lcd and ! (execute a
shell command) commands to locate the file on your local system if it is
not in the directory that was your current working directory at the time
you started ftp. Also, if the file is not in your current directory, you can
specify a full (absolute) path name for the file you want to send to your
PC.
Step 2. Determine whether the file you are trying to transfer to your PC is an
ASCII file or a binary (non-ASCII) file and set the transfer mode
accordingly:
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, 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 handling will not occur (See “ASCII End-of-Line Problems”
on page 132).