Re: octal dump
On 11/18/08 05:50, mike wrote:
Girish Kulkarni wrote:
In my work I collect a lot of data from the serial port, spit out by
other machines. od is VERY useful when I collect data from a new
machine. Are there carriage returns? Are there other strange
characters?.... After those questions are answered it's much easier to
parse the data and do stuff with it.
I was trying to understand octal dumps today that can be obtained
using od. But two questions cropped up:
1. When would an octal dump be useful? Surely not in perusing text
files?! And when people say they use octal (or hex) dump to check
and edit binary files, how do they learn to do so?
2. I understand that od shows the file offsets in decimal if I say 'od
-Ad'. But I find that the offset of the last line does not match
with the size of the file given by 'du -h'. Why is that?
I really am puzzled after bumping into this command by chance. Any
comments would help.
But do you do a pure od, or an "od -tx"?
Ron Johnson, Jr.
Jefferson LA USA
If you don't agree with me, you are worse than Hitler!!!