1828474 Members
3078 Online
109978 Solutions
New Discussion

Re: conversion utilities

 
lastgreatone
Regular Advisor

conversion utilities

I converted a binary file on hpux using dos2ux and ftp in ascii to a Linux box and the file is still in binary. Any known utils on Linux that I can use to convert locally.
2 REPLIES 2
Darrell Allen
Honored Contributor

Re: conversion utilities

dos2ux is for converting dos/windows ascii files to hpux ascii files. The primary difference between these formats is hpux uses one character (newline) to terminate each line in an ascii file while dos/windows used 2 characters (carriage return and linefeed).

dos2ux is not for converting binary files to ascii. dos2ux on a binary file is not going to result in a file that is usable.

When you ftp in ascii mode, the conversion is done for you if needed. Since both hpux and linux use newlines as line terminators, as ascii ftp should not have performed a conversion on the file.

Why not simply transfer the file in binary mode?

I don't know how you can convert a binary file into ascii anyway.

You can use the strings command on a binary file to print out any ascii text in the file. Again, that may or may not be helpful.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
lastgreatone
Regular Advisor

Re: conversion utilities

Thanks Darrell. Well someone insisted I should be able to convert the file to linux ascii to then recompile it in the open-source application that is missing a particular function in a module.

Failing this conversion it appears we have to wait 2 months for the updated code.

The binary in question was compiled on Solaris 8, but obviously won't run as is on RH 7.1.