Skip to content

Instantly share code, notes, and snippets.

@huangzworks
Last active December 19, 2015 01:09
Show Gist options
  • Save huangzworks/5874322 to your computer and use it in GitHub Desktop.
Save huangzworks/5874322 to your computer and use it in GitHub Desktop.

od 命令就可以清晰地看到符号了。

至于 RDB 文件的格式,在这里有详细记载: http://www.redisbook.com/en/latest/internal/rdb.html#id4

$ od -c dump.rdb
0000000   R   E   D   I   S   0   0   0   6 376  \0  \n 006   m   y   l
0000020   i   s   t   ,   ,  \0  \0  \0   "  \0  \0  \0 003  \0  \0  \f
0000040   f   e   n   g   x   i   n   g   x   i   n   g 016  \b   z   e
0000060   n   g   h   u   a   n  \n  \a   z   e   n   g   j   u   n 377
0000100  \n  \b   l   a   n   g   u   a   g   e   !   !  \0  \0  \0 030
0000120  \0  \0  \0 004  \0  \0 004   j   a   v   a 006 001   c 003 003
0000140   c   +   + 005 006   p   y   t   h   o   n 377 377   _ 343 300
0000160 367 024 364 340   V
0000165

$ od dump.rdb
0000000 042522 044504 030123 030060 177066 005000 066406 066171
0000020 071551 026164 000054 000000 000042 000000 000003 006000
0000040 062546 063556 064570 063556 064570 063556 004016 062572
0000060 063556 072550 067141 003412 062572 063556 072552 177556
0000100 004012 060554 063556 060565 062547 020441 000000 014000
0000120 000000 002000 000000 065004 073141 003141 061401 001403
0000140 025543 002453 070006 072171 067550 177556 057777 140343
0000160 012367 160364 000126
0000165
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment