Search code examples
linuxbinarybinaryfileslinux-mintbinary-data

Convert a Windows .exe file into the binary contents


I have a Microsoft Windows .exe file on my Linux Mint box. I would like to convert the contents into a .txt file, but in the binary (think of 1s and 0s) form.

I have found commands which want to convert it into hexademical, or other formats, which are outside the scope of my requirements.

Is there a command to do this on Linux?


Solution

  • You can use xxd to view binary or hexadecimal dumps

    for binary

    xxd -b {_file_}.exe

    To get the output of this command inside a .txt file

    xxd -b {_file_.exe} > {_file_}.txt