unix executable file?

Discussion in 'Mac Basics and Help' started by bob2131, Sep 10, 2008.

  1. bob2131 macrumors 6502a

    Jul 27, 2008
    ive come across "unix executable file" a few time when ive installed/tried to) some applications.

    what is this?

    ive noticed that whenever i double click this file, i get a terminal message saying "cannnot execute binary file"

    does this mean i need a separate application to open these files?? :confused:

    (im running a new macbook 10.5.4)

  2. jc1350 macrumors 6502a

    Feb 4, 2008
    a unix executable file is just that, a file that's executable (like a windows .exe file).

    While Mac OS is UNIX, the file you have, if it isn't part of a Mac program, may not run on your system because:

    1. It may be compiled to run on a different type CPU
    2. It may require libraries that the Mac does not have or the Mac has but are the wrong versions.
    3. The permissions aren't set to "execute." I'm a command-line junkie and use 'chmod u+x filename' to grant the user permission to execute the file (don't include the quotes).

    The program is a command-line program; that's why it opens a terminal.

    If course, if you don't know what it does, where it came from, etc, don't run it.
  3. robbieduncan Moderator emeritus


    Jul 24, 2002
    Not everything the Finder claims is a Unix executable really is. As far as I am aware (I'm on a Windows PC right now so can't double check this) the Finder marks any file with no extension that has execute permissions as a Unix executable file. It makes no check on the contents of the file to ensure that is is, in fact, an executable file. It may simply be a data file with the wrong extension, or plugin code that is not executable directly...
  4. jc1350 macrumors 6502a

    Feb 4, 2008
    That's UNIX/Linux behavior. You can give any file "execute" permission and it will show as such in directory listing. But you try to run, say, a text file (not a script that would be plain text, but an actual "readme" type file), the OS will attempt to run it but give an error that it's not an executable file.
  5. bob2131 thread starter macrumors 6502a

    Jul 27, 2008
    right, thanks guys.

    i managed to solve the issue.
    i had a zip file on my pc, i extracted the zip on my pc, THEN transferred it to my mac.
    thats when the unix file thing was happening.

    THEN, i tried putting the zip file onto my mac desktop, and when i did, it had a .iso extension....kinda like a disk image or something.

    the fact that it was unzipped or unrarred or whatever on pc, the mac didnt like this......the mac only liked it when it did it on the mac. kinda like the mac likes to do things in its own way........

    ive had this issue before too.......

    so everytime i get a "unix extractable file".....it just wont work on my mac willl it?

    thanks people.
    this forum rocks. :D
  6. bob2131 thread starter macrumors 6502a

    Jul 27, 2008

    'chmod u+x filename'

    what does this mean? im sure ive come across this before, i just didnt understand what it means
  7. jc1350 macrumors 6502a

    Feb 4, 2008
    chmod is the command line tool in unix/linux to change permissions (read, write, execute).

    'chmod u+x filename' gives the user execute permission for the file.

    unix/linux permissions (Mac OS is unix) have 3 sets of permissions: user, group, and world/other. those are the permissions you see when you type 'ls -l' in terminal.
  8. phrac macrumors member


    Feb 7, 2004
    it basically says "change the mode (chmod) so that the user has execute (add execute bit to user = u+x) permissions on the filename.

Share This Page