What are the executable file formats in Solaris and Linux? | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Unix/Linux Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

What are the executable file formats in Solaris and Linux?

UNIX for Dummies Questions & Answers


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 03-25-2013
vamshigvk475's Unix or Linux Image
vamshigvk475 vamshigvk475 is offline
Registered User
 
Join Date: Jun 2012
Last Activity: 7 December 2014, 8:27 PM EST
Location: BANGALORE, INDIA.
Posts: 39
Thanks: 4
Thanked 1 Time in 1 Post
Oracle What are the executable file formats in Solaris and Linux?

we all knew that .exe files are the executable file formats in windows....... Similarly, what are the executable file formats in solaris and linux ........

please tell meUnix or Linux Image



Thanks in Advance.
Sponsored Links
    #2  
Old Unix and Linux 03-25-2013
Yoda's Unix or Linux Image
Yoda Yoda is offline Forum Advisor  
Jedi Master
 
Join Date: Jan 2012
Last Activity: 24 February 2015, 2:15 PM EST
Location: Galactic Empire
Posts: 3,401
Thanks: 240
Thanked 1,215 Times in 1,141 Posts
In Linux, file types are not recognized by file extensions. It is actually determined by the data in a file. The file extension doesn't even matter.

If you run file command on any file, three sets of tests, performed in this order: filesystem tests, magic number tests and language tests to determine the file type.

Go over the file command manual for more information:

Code:
man file

Sponsored Links
    #3  
Old Unix and Linux 03-25-2013
verdepollo's Unix or Linux Image
verdepollo verdepollo is offline
Registered User
 
Join Date: Mar 2010
Last Activity: 2 January 2015, 8:32 PM EST
Location: Mexico
Posts: 725
Thanks: 11
Thanked 106 Times in 102 Posts
"exe" is just an extension name used by Windows to identify executable files but has nothing to do with its internal constitution.

Linux does not rely on extension names but a "Magic Number" database that helps identify the type of any given file by reading the first bytes of its data and comparing it to a pre-defined "signature". You can check the full database on your Linux system by taking a look at "/usr/share/magic".

Regardless of the format in Linux, a file won't run unless it has the "execute" permission on.

As far as I know Windows does not use magic numbers at all -- Although the last version of Windows I used was Windows 2K so it may have changed by now.

Most SystemV-based operating systems (such as Linux) use ELF binary format and do not append any extension to the file name.

For the record, back in the DOS days executables used to be in COM format and later in MZ format under Win 9x and its variants.

Nowadays Windows uses PE format to pack its executables.
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Removing formats (bold) from UNIX file suresh3566 Shell Programming and Scripting 6 01-08-2013 03:43 AM
Executable file on Solaris Klyde Solaris 3 09-09-2011 07:38 AM
Executable compiled on solaris 10 not working on solaris 9 ash_bit2k2 Solaris 4 05-20-2010 10:59 AM



All times are GMT -4. The time now is 04:34 AM.