How to export hex result on linux Console ?
There is a simple way to export hex from the file
xxd command helps for us
xxd -p file
ubuntu@instance-20240128-1936:~/go-blog-dbs$ xxd /etc/localtime 00000000: 545a 6966 3200 0000 0000 0000 0000 0000 TZif2........... 00000010: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000020: 0000 0000 0000 0001 0000 0004 0000 0000 ................ 00000030: 0000 5554 4300 545a 6966 3200 0000 0000 ..UTC.TZif2..... 00000040: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000050: 0000 0000 0000 0000 0000 0000 0001 0000 ................ 00000060: 0004 0000 0000 0000 5554 4300 0a55 5443 ........UTC..UTC 00000070: 300a 0.