HP-UX System Administrator's Guide: Configuration Management

2. Determine whether the file you are trying to transfer to your PC is an ASCII text
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.
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.
3. Transfer the file using FTP’s send command.
Example 5-3 Send from Different Directory
To send the ASCII file phone.dat (located in the /var/tmp directory on your
HP-UX system) to the PC:
ftp>lcd /var/tmp
ftp>ascii
ftp>send phone.dat
— OR —
ftp>ascii
ftp>send /var/tmp/phone.dat
Example 5-4 Send from Current Directory
To send the graphics file roadmap.jpg from the current working directory:
ftp>binary
ftp>send roadmap.jpg
98 Configuring Networking