Find the answer to your Linux question:
Results 1 to 7 of 7
I have a file with “bin” extension (foo.bin) and I have tried to run it (./foo.bin) but I got the following message: -bash: ./foo.bin: cannot execute binary file However, I ...
  1. #1
    Just Joined!
    Join Date
    Feb 2009
    Posts
    9

    Can Not run file with .bin extension

    I have a file with “bin” extension (foo.bin) and I have tried to run it (./foo.bin) but I got the following message: -bash: ./foo.bin: cannot execute binary file
    However, I did change permission by : chmod +x foo.bin
    Is any way I can open and run this binay file?

  2. #2
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    9,496
    Try using sh:

    Code:
    sh foo.bin
    Registered Linux user #270181
    TechieMoe's Tech Rants

  3. #3
    Just Joined!
    Join Date
    Feb 2009
    Posts
    9
    I have tried (sh foo.bin) but did not work. It gives a message :"cannot execute binnary file"

  4. #4
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    9,496
    Just out of curiosity, what kind of program is it that you're trying to run?
    Registered Linux user #270181
    TechieMoe's Tech Rants

  5. #5
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,114
    It looks like your file is not a properly formed executable
    file. The command file <filename> should tell you
    what your system thinks this file is. Where did you get it?
    Is it an installer for flash or realplayer or something?

  6. #6
    Just Joined!
    Join Date
    Feb 2009
    Posts
    9
    This file (foo.bin) is a result of compiling a program so when compilation is successfull, it produced this binary file.

  7. #7
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    9,496
    Quote Originally Posted by louie-1 View Post
    This file (foo.bin) is a result of compiling a program so when compilation is successfull, it produced this binary file.
    That's odd. Normally when I compile a program it comes out with no extension or with the name a.out. Perhaps the program didn't compile properly?
    Registered Linux user #270181
    TechieMoe's Tech Rants

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...