UNIX - Use of od
UNIX - od
% cat test.123 | od -x
0000000 5468 6973 2069 7320 6120 7465 7374 202e
0000020 2e0a
0000022
% cat test.123 | od -c
0000000 T h i s i s a t e s t .
0000020 . \n
0000022
----------------------------------------------------------------
-a same as -t a, select named characters
-b same as -t oC, select octal bytes
-c same as -t c, select ASCII characters or backslash escapes
-d same as -t u2, select unsigned decimal shorts
-f same as -t fF, select floats
-h same as -t x2, select hexadecimal shorts
-i same as -t d2, select decimal shorts
-l same as -t d4, select decimal longs
-o same as -t o2, select octal shorts
-x same as -t x2, select hexadecimal shorts
-----------------------------------------------------------------------
/usr/bin/od
-c Displays single-byte characters. Certain non-graphic
characters appear as C-language escapes:
null \0
backspace \b
form-feed \f
new-line \n
return \r
tab \t
Others appear as 3-digit octal numbers. For example:
echo "hello world" | od -c
0000000 h e l l o w o r l d \n
0000014
Last Updated (Tuesday, 12 April 2011 15:16)
Archived Article List

