Find the answer to your Linux question:
Results 1 to 4 of 4
Is there a command in Unix which can distinguish between an executable on solaris, on windows, on Linux, on HP unix etc?...
  1. #1
    Just Joined!
    Join Date
    Jul 2007
    Posts
    1

    unix cmd for distinguishing exe on Solaris/Windows/Linux

    Is there a command in Unix which can distinguish between an executable on solaris, on windows, on Linux, on HP unix etc?

  2. #2
    Linux User
    Join Date
    Aug 2006
    Posts
    458
    you can use the file command

  3. #3
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    I'm not sure what you mean. The 'file' command will tell you what sort of file you have (Bash script, ELF binary, etc.), but a program compiled to ELF, be it Linux or Solaris, should appear the same.

    Can you explain what exactly you want?
    DISTRO=Arch
    Registered Linux User #388732

  4. #4
    Linux Engineer Javasnob's Avatar
    Join Date
    Jul 2005
    Location
    Wisconsin
    Posts
    942
    file usually includes other information, like what processor it's compiled for:
    Code:
    /bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.6, dynamically linked (uses shared libs), stripped
    Flies of a particular kind, i.e. time-flies, are fond of an arrow.

    Registered Linux User #408794

Posting Permissions

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