22
17

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Linux でバイナリデータを16進ダンプ表示する [odコマンド]

Posted at

Linux でバイナリデータを16進表示するときのコマンドです。
たまにしか使わないので、いつも忘れてしまう。。。

od -tx1z -Ax <binary file name>
-tx1z : Format. Hexadecimal, 1 Byte, printable ascii characters.
-Ax   : Adress radix is Hexadecimal. 

使用例

$ od -tx1z -Ax test.c 
000000 23 69 6e 63 6c 75 64 65 20 3c 73 74 64 69 6f 2e  >#include <stdio.<
000010 68 3e 0a 6d 61 69 6e 28 29 0a 7b 0a 09 70 72 69  >h>.main().{..pri<
000020 6e 74 66 20 28 22 48 65 6c 6c 6f 20 77 6f 72 6c  >ntf ("Hello worl<
000030 64 5c 6e 22 29 3b 0a 7d 0a                       >d\n");.}.<
000039

22
17
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
22
17

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?