Re: convert 8086 relocatable file to ascii text
Atropo schreef:
> Hi all.
>
> tried to convert what I supposed was an ebcdic file with dd if=infile
> conv=ascii of=ofile, the result file was not ascii text even when the
> file command told me so. when i throw a file command to the infile it
> says 8086 relocatable. how can I manage this file to convert it to
> plain ascii text?
Unless it came from an old IBM mainframe, it's not very likely that it's
an EBCDIC file in the first place. Especially not if it looks like an
executable and dd conv=ascii does not return ascii characters. What
makes you think it is a text file anyway? And why should it be in the
EBCDIC format?
If it's actually a binary file, this is no longer a specific question.
There's lots of ways, with very different results. You can encode the
file in any arbitrary base that can be translated to readable
characters, such as base 8, 16 or 64. For that, see man od, hexdump and
uuencode.
Another thing you might want is print all the readable strings in the
file with "string". Keep in mind that this is usually only a small
fraction of the file.
Not to mention other possibilities, but my crystal ball has coffee
stains, so you'll just need to enlighten us yourself.
Regards,
Steven
|