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

  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 Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-25-2013
vamshigvk475's Avatar
vamshigvk475 vamshigvk475 is offline
Registered User
 
Join Date: Jun 2012
Last Activity: 2 July 2014, 5:06 PM EDT
Location: BANGALORE, INDIA.
Posts: 38
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 me



Thanks in Advance.
Sponsored Links
    #2  
Old 03-25-2013
Yoda's Avatar
Yoda Yoda is offline Forum Advisor  
Jedi Master
 
Join Date: Jan 2012
Last Activity: 2 September 2014, 9:22 AM EDT
Location: Galactic Empire
Posts: 3,362
Thanks: 230
Thanked 1,197 Times in 1,125 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 03-25-2013
verdepollo's Avatar
verdepollo verdepollo is offline
Registered User
 
Join Date: Mar 2010
Last Activity: 1 September 2014, 11:09 AM EDT
Location: Mexico
Posts: 725
Thanks: 11
Thanked 105 Times in 101 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 Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 02:43 AM
Executable file on Solaris Klyde Solaris 3 09-09-2011 06:38 AM
Executable compiled on solaris 10 not working on solaris 9 ash_bit2k2 Solaris 4 05-20-2010 09:59 AM



All times are GMT -4. The time now is 10:01 AM.