Unix outputting hex / raw integers
It's often useful to output something as a hex or raw value
This command comes in handy:
# od -cb
Examples:
# echo "abc" | od -cb
This results in:
0000000 a b c \n
141 142 143 012
0000004
In the following, ./a.out is an executable in the same directory.
# od ./a.out -cb | head
# od ./a.out
# od -b ./a.out
This command comes in handy:
# od -cb
Examples:
# echo "abc" | od -cb
This results in:
0000000 a b c \n
141 142 143 012
0000004
In the following, ./a.out is an executable in the same directory.
# od ./a.out -cb | head
# od ./a.out
# od -b ./a.out
Comments
Post a Comment