# Is there a unix program to display ASCII ? Hex ?



## mikey777 (May 10, 2020)

Sometimes I need a program to just display ASCII codes, rather than look it up. I wrote a program in C to do this on Win/XP using Watcom. Is there a unix program that does this ?

Also, it there a program like Frhed to display a file in hex for unix ?


----------



## drhowarddrfine (May 10, 2020)

To view files in different format `man od`


----------



## Eric A. Borisch (May 10, 2020)

Or hexdump(1).


----------



## richardtoohey2 (May 10, 2020)

man ascii will show the ASCII table.

For a hexdump of a file:

hexdump -C filename


----------



## mickey (May 10, 2020)

Years ago I wrote a small utility that displays the ASCII code of keys pressed as decimal, hexadecimal, octal. binary and symbolic names. I still use it occasionally.


----------



## unitrunker (May 10, 2020)

`od -t x1`


----------



## George (May 10, 2020)

editors/hexedit is a very basic hex editor for the console. It shows ASCII, hex, and lets you edit stuff.
There is also a graphical hex editor, editors/whexeditor.


----------



## mikey777 (May 11, 2020)

Thx for all the replies, I will man od soon !


----------



## Hakaba (May 12, 2020)

`apropos hex`
`apropos ascii`


----------



## hsw (May 12, 2020)

There is also a program called xxd which can take a hex dump and change it to binary.  It is sometimes usefull in shell script tha need to manipulate binary files.


----------



## memreflect (May 12, 2020)

hsw said:


> There is also a program called xxd which can take a hex dump and change it to binary.  It is sometimes usefull in shell script tha need to manipulate binary files.


Yes, that's only installed by editors/vim and editors/vim-console though. Nothing else will install it, including editors/neovim and editors/vim-tiny.


----------



## mark_j (May 12, 2020)

mikey777 said:


> Sometimes I need a program to just display ASCII codes, rather than look it up. I wrote a program in C to do this on Win/XP using Watcom. Is there a unix program that does this ?
> 
> Also, it there a program like Frhed to display a file in hex for unix ?


Yes devel/okteta or editors/wxHexEditor


----------

