Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
What OS is MS 2000??
On a UNIX or Linux system, you should have a utility named 'od'.
"od -c filename" should display the file as ascii characters where possible.
But a byte value can range from 0 to 255 and ASCII characters are defined only from 0 to 127 and not all of those are printable characters. I don't remember how "od -c" will display non-ascii values.
If you just want to see the values of the bytes (not necessarily as ASCII characters), you can use:od -x filename
This will display the hex values of the bytes. There are other options also.

Those commands may be useful, but what I'm really trying to do is compile c code in UNIX which can convert a binary datafile to ASCII. From there, I can use winRAR to extract the data for viewing. Any thoughts on this are welcome...thanks

Binary to ascii is not really defined.
If you are talking about 2-byte unicode, there may be a special tool reading that.
If you are talking about moving files using FTP, there is the issue of binary files versus ascii files because of the different representation of "the new line" in unix and in windows. UNIX uses just a "linefeed" and windows uses "linefeed" and "carriage return".
So, if you made the mistake to download a test file (or html etc.) in binary format from a UNIX based server, it would not display right in windows. You could fix this with ftp in pumping it up binary and back down in ascii, or you could use tr or an editor to replace each "linefeed" by "linefeed carriage return"
So, what exactly is your issue?
If you just want to look for printable characters in some executables, octaldump "od -c filename" or "strings filename | more" will do it.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |