Linuxでファイルを16進とASCII表示でダンプ

スポンサーリンク
スポンサーリンク

ファイルの内容をダンプするコマンド。いつも忘れるのでメモ。
16進とASCII両方で表示させます。

od -t xCz ファイル

例えば、次のファイルをダンプします。

sshd_config

#       $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $
# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin
       :
       :

このようになります。

$ od -t xCz sshd_config
0000000 23 09 24 4f 70 65 6e 42 53 44 3a 20 73 73 68 64  >#.$OpenBSD: sshd<
0000020 5f 63 6f 6e 66 69 67 2c 76 20 31 2e 38 30 20 32  >_config,v 1.80 2<
0000040 30 30 38 2f 30 37 2f 30 32 20 30 32 3a 32 34 3a  >008/07/02 02:24:<
0000060 31 38 20 64 6a 6d 20 45 78 70 20 24 0a 0a 23 20  >18 djm Exp $..# <
0000100 54 68 69 73 20 69 73 20 74 68 65 20 73 73 68 64  >This is the sshd<
0000120 20 73 65 72 76 65 72 20 73 79 73 74 65 6d 2d 77  > server system-w<
0000140 69 64 65 20 63 6f 6e 66 69 67 75 72 61 74 69 6f  >ide configuratio<
0000160 6e 20 66 69 6c 65 2e 20 20 53 65 65 0a 23 20 73  >n file.  See.# s<
0000200 73 68 64 5f 63 6f 6e 66 69 67 28 35 29 20 66 6f  >shd_config(5) fo<
0000220 72 20 6d 6f 72 65 20 69 6e 66 6f 72 6d 61 74 69  >r more informati<
0000240 6f 6e 2e 0a 0a 23 20 54 68 69 73 20 73 73 68 64  >on...# This sshd<
       :
       :

コメント

タイトルとURLをコピーしました