Sample Header Ad - 728x90

How to format hexdump as xxd, possible for xxd -revert?

4 votes
2 answers
2970 views
I wish to dump the raw content of a SD card into a file for inspection. Most parts of it are zeroes. Learnt from this SuperUser answer I could use pv to show the progress of od and hexdump. Both ETA are 1.5 hours. # pv /dev/sdd | od -x --endian=big > sdd_file ... ... ... [> ] ... ETA 1:34:42 and # pv /dev/sdd | hexdump -C > sdd_file ... ... ... [> ] ... ETA 1:35:01 However xxd would need 11 hours. # pv /dev/sdd | xxd -a -u > sdd_file ... ... ... [> ] ... ETA 10:48:53 I prefer xxd mostly because of the -revert possibility. But xxd would take way too long to process a disk. How to format hexdump (or od) to produce the same file format as xxd, so that the file is possible to be -reverted by xxd?
Asked by midnite (613 rep)
Dec 18, 2021, 06:59 PM
Last activity: Jun 29, 2022, 12:33 PM