03-25-2013
"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.
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Please help! I am preparing a Linux Script to move windows executable files from samba directory to quarantine directory. For safety, will use "file" command to determine if its executable. Anyone can help? Below is my trial script, but it just move everything, including non-executable.. any wrong... (2 Replies)
Discussion started by: gavintam
2 Replies
2. Solaris
Hi
I compiled an executable on Solaris 10 which creates semaphore ( semget)
but it didn't work on solaris 9 , while it is executing sucessfully on solaris 10. It is throwing the system error that Invalid arguments ( system error 22) on solaris 9.
the ldd for the executable on two servers is as... (4 Replies)
Discussion started by: ash_bit2k2
4 Replies
3. Solaris
Hi!
What are executable file formats in Solaris? Can someone please share it?
Thanks! (3 Replies)
Discussion started by: Klyde
3 Replies
4. Shell Programming and Scripting
Hi ,
Could you please guide me how to remove formatting (bold text) in a unix file?
vi editor showing like this...
^
Cat command showing like this...
tl21ss01
tl21ss02
tl21ss03 (6 Replies)
Discussion started by: suresh3566
6 Replies
5. Shell Programming and Scripting
Hi All,
I just want to know how to get the executable name of the perl script as i know "$0" will give me the script name but i want to know the executable name which i got it from the script using pp command.
Regards
Raj (1 Reply)
Discussion started by: kar_333
1 Replies
6. Shell Programming and Scripting
Hi,
I want to check the incoming files whether the file is Mac file or dos/windows file in unix shell script.
Sometimes client is posting Mac file and sometimes it is dos file. Could you please help me how to determine/check whether the file is Mac or dos.
Help in advance
Thanks (4 Replies)
Discussion started by: lkeswar
4 Replies
7. Shell Programming and Scripting
Dear Experts,
I am an ERP consultant and would like to learn shell script. We are working on Linux SUSE 11.4 and I am very new to shell scripting. We can manually encrypt an excel file using "executable jar" through command prompt by placing the jar file & the file to be encrypted on a physical... (1 Reply)
Discussion started by: nithin226
1 Replies
8. UNIX for Beginners Questions & Answers
Dear all,
I download a .exe file in my current folder called: ukbmd5.exe. I was told to run the command below: ukbmd5 ukb25278.enc to verify the integrity of the files that you have downloaded and the program ukbmd5 has been made available to assist with decrpying ukb25278.enc.
while when I run... (1 Reply)
Discussion started by: forevertl
1 Replies
GZEXE(1) General Commands Manual GZEXE(1)
NAME
gzexe - compress executable files in place
SYNOPSIS
gzexe name ...
DESCRIPTION
The gzexe utility allows you to compress executables in place and have them automatically uncompress and execute when you run them (at a
penalty in performance). For example if you execute ``gzexe /usr/bin/gdb'' it will create the following two files:
-rwxr-xr-x 1 root root 1026675 Jun 7 13:53 /usr/bin/gdb
-rwxr-xr-x 1 root root 2304524 May 30 13:02 /usr/bin/gdb~
/usr/bin/gdb~ is the original file and /usr/bin/gdb is the self-uncompressing executable file. You can remove /usr/bin/gdb~ once you are
sure that /usr/bin/gdb works properly.
This utility is most useful on systems with very small disks.
OPTIONS
-d Decompress the given executables instead of compressing them.
SEE ALSO
gzip(1), znew(1), zmore(1), zcmp(1), zforce(1)
CAVEATS
The compressed executable is a shell script. This may create some security holes. In particular, the compressed executable relies on the
PATH environment variable to find gzip and some standard utilities (basename, chmod, ln, mkdir, mktemp, rm, sleep, and tail).
BUGS
gzexe attempts to retain the original file attributes on the compressed executable, but you may have to fix them manually in some cases,
using chmod or chown.
GZEXE(1)