Dd
hexedit:更改列數(每行字節數)
我
hexedit
用來顯示/編輯磁碟 MBR(512 字節,用 dd 複製)。當我打開文件時,
hexedit
將文件顯示為 9 列,每列 4 個字節(每行 36 個字節)。這是非常不幸的。我需要以有意義的方式對齊(即 8 列,每行 32 列)我在手冊頁中找不到任何方法。
有什麼我可以使用的技巧嗎?
更新:
這是我使用的命令:
dd if=/dev/sda of=sda.img bs=512 count=1 hexedit sda.img
關於我得到的輸出,它看起來類似於 slm,只有 9 列而不是 8 列。
顯然,它關閉了終端的寬度。如果您調整終端的大小恰到好處,您可以
hexedit
顯示 8 列而不是 9 列。例子
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................ 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................ 00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................ 00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................ 00000080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................ 000000A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................ 000000C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 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 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 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 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 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 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 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................ 000001A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................ 000001C0 01 00 EE FE FF FF 01 00 00 00 AF 32 CF 1D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........2.................... 000001E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA ..............................U. 00000200 00000220 00000240 00000260 00000280
我將上述終端的列寬設置為 151x55。
$ resize COLUMNS=151; LINES=55; export COLUMNS LINES;