How to view files in binary in the terminal?

How to view files in binary in the terminal?

Asked on October 22, 2018 in Linux.
Add Comment


  • 7 Answer(s)

    xxd can do both binary and hexadecimal

    bin:

    xxd -b file
    

    hex:

     
    xxd file
    

     

     

    Answered on October 22, 2018.
    Add Comment

    Use this:

    hexdump -C your file.bin
    

     

    unless you want to edit it of course. Most linux distros have

     

     
    hexdump
    

    by default (but obviously not all).

     

     

    Answered on October 22, 2018.
    Add Comment

    You can use hexdump binary file

    sudo apt-get install hexdump
    hexdump -C yourfile.bin
    
    Answered on October 22, 2018.
    Add Comment

    If you want to open binary files (in CentOS 7):

    strings <binary_filename>
    Answered on January 16, 2019.
    Add Comment

    You can use hexdump binary file

    sudo apt-get install hexdump
    
    hexdump -C yourfile.bin
    Answered on January 16, 2019.
    Add Comment

    xxd does both binary and hexadecimal

    bin:

    xxd -b file

    hex:

    xxd file
    Answered on February 13, 2019.
    Add Comment

    xxd does both binary and hexadecimal

    bin:

    xxd -b file

    hex:

    xxd file
    Answered on February 13, 2019.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.