The source code is written to use an ANSI C99 compatible compiler for portability between Operating Systems.
Hexed is released under the BSD license
hexed -e 10 1 2 3 - 01.dat
hexed - Hexadecimal File Editor v?.?.? Usage: hexed [options] [file] Options: -? Shows this help screen -c [src] [dest] [len] Copy data from src to dest for len words -co [src] [dest] [len] Copy data from src overwriting dest for len words -d [src] [len] Display data from src for len words -e [dest] [...] Enter hex values [...] at dest -i [dest] [cnt] [...] Insert hex values [...] at dest repeating cnt times. Defaults to 0 for empty hex values. -m [src] [dest] [len] Move data from src to dest for len words -mo [src] [dest] [len] Move data from src overwriting dest for len words -r [src] [len] Remove data from src for len words -w [bytes] Set the word size in bytes: 1 = 8 bits 2 = 16 bits, 4 = 32 bits, 8 = 64 bits
-c 100 200 20
This will copy 32 bytes from 0x100 to 0x200 moving everything at 0x200 up by 32 bytes.
-co 100 200 20
Copy 32 bytes from 0x100 to 0x200 overwriting the original data.
-d 0 100
Displays values starting from 0x0 for 0x100 (256) bytes, all options to commands are set in hex values.
-e 100 10 20 30 40
Enters the values 0x10, 0x20, 0x30 and 0x40 starting at 0x100. If a file name is set then the values will be automatically saved to the file.
-i 100 10 01 02 03
This will insert the bytes 0x01 0x02 0x03 at 0x100 16 times.
-m 100 200 20
Will move 32 bytes from 0x100 to 0x200 and move everything from 0x120 to 0x220 down by 32 bytes.
-mo 100 200 20
This will move 32 bytes from 0x100 to 0x200 but will insert zeroes into the file below the destination. This way the data will appear where you expect it to be after the move.
-r 10 100
Removes 0x100 bytes from the file at 0x10 to 0x110.
This will set the word size to 16 bit so when used with a command like dump will display the data as 2 bytes long as in this example:
hexed -w 2 -e 18 ffff abcd 1234 dead -d 00000000 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000010 0000 0000 0000 0000 ffff abcd 1234 dead ............4...