正如您所看到的 hexdump 命令的输出。我想遍历整个硬盘(或某些限制),以便找到一个值作为 a while-loop
,例如APSB
值。
在我的例子中,步骤是4096
字节
- 迭代 1:
hexdump -n 4096 -Cv /dev/disk0s1 -s 0
- 迭代 2:
hexdump -n 4096 -Cv /dev/disk0s1 -s 4096
- 迭代 3:
hexdump -n 4096 -Cv /dev/disk0s1 -s 9192
这里有一个相关的问题我对上一次迭代的看法。
但是,如何在hexdump
输出中找到一个值?
是否可以?
sh-3.2# hexdump -n 4096 -Cv /dev/disk0s1 -s 0
00000000 8d 1c 09 48 65 8c 3c 6e 01 00 00 00 00 00 00 00 |...He.<n........|
00000010 bd 04 00 00 00 00 00 00 01 00 00 80 00 00 00 00 |................|
00000020 4e 58 53 42 00 10 00 00 00 f4 01 00 00 00 00 00 |NXSB............|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040 02 00 00 00 00 00 00 00 a8 8d 96 da 5a 95 46 e6 |............Z.F.|
00000050 82 3e fb 1e 40 7d 3e 79 16 04 00 00 00 00 00 00 |.>..@}>y........|
00000060 be 04 00 00 00 00 00 00 10 00 00 00 84 04 00 00 |................|
00000070 01 00 00 00 00 00 00 00 11 00 00 00 00 00 00 00 |................|
00000080 0a 00 00 00 e2 00 00 00 00 00 00 00 00 00 00 00 |................|
00000090 00 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 |................|
000000a0 34 1e 00 00 00 00 00 00 01 04 00 00 00 00 00 00 |4...............|
000000b0 00 00 00 00 04 00 00 00 02 04 00 00 00 00 00 00 |................|
000000c0 06 04 00 00 00 00 00 00 08 04 00 00 00 00 00 00 |................|
000000d0 0a 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
提前致谢...