2

I am trying to use xxd command to convert string to hex. I have typed this command in cmd in windows xxd -p <<< "Hello world". But I have got this in my cmd 'xxd' is not recognized as an internal or external command, operable program or batch file.

How can I use xxd in cmd in windows?

Thanks.

4

6 Answers 6

9

Use VIM for this

https://ftp.nluug.nl/pub/vim/pc/gvim73_46_s.zip

C:\Program Files (x86)\Vim\vim74>.\xxd -v

Source: https://superuser.com/a/638850

8

You could use git-bash to do that if you have installed it.

example

1

These days the full linux kernel is made available and officially supported by windows via WSL. Once installed, a program like Windows Terminal can be used to execute linux commands.

0

Short answer is you probably can't because it's a UNIX command...

What you can do is use GnuWin32/MinGW/CygWin, which are ports of Linux GNU utilities fro Windows.

Read more about them here: Difference between GNUWin32 and cygwin

0

See this utility clone.

https://sourceforge.net/projects/xxd-for-windows/

The operation is similar. To see in hexadecimnal use "xxd file.txt", to see in binary use "xxd -b file.txt".

0

If you have powershell version 5.0 or later, you can use the powershell built-in function Format-Hex

$ Format-Hex '.\your-file-name'

It is not as powerfull as xdd but you can run it natively in Windows

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.