Thank you all who answered my question. Here is my conculsion. Just FYI.
> >>Is there any tools under Unix to show files similar to dos debug? I mean > >>the output looks like the following: so that I can see both the hex code > >>and the ascii codes: > >> > >In terms of "always available" there's "od -cx".
Sample output:
0000000 # ! / u s r / b i n / s h \n # \t 2321 2f75 7372 2f62 696e 2f73 680a 2309 0000020 C o p y r i g h t ( c ) 1 9 436f 7079 7269 6768 7420 2863 2920 3139
BTW, od -cx1 doesn't work
> >With GNU od > >(at the very least; I'm not certain how GNU-specific the "z" > >format is) you can also use "od -tx1z" to better match your > >sample format.
od: invalid character `z' in type string `x1z'
od -tx1 /bin/true 0000000 23 21 2f 75 73 72 2f 62 69 6e 2f 73 68 0a 23 09 0000020 43 6f 70 79 72 69 67 68 74 20 28 63 29 20 31 39
od -tx1 -c
Sample output:
0000000 23 21 2f 75 73 72 2f 62 69 6e 2f 73 68 0a 23 09 # ! / u s r / b i n / s h \n # \t 0000020 43 6f 70 79 72 69 67 68 74 20 28 63 29 20 31 39 C o p y r i g h t ( c ) 1 9
This is the best result I can get.
> >There are also a few "hexdump" programs to be > >found in the comp.sources.* archives. > > > > --Ken Pizzini > > Or, if you're an emacs user, did you try > > M-x hexl-mode ? > > On the other hand, the format is a bit different but then you can also edit > the file... > > Jens
I settle down with this one. Thanks!