Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Newbie question about difference between executable file and ordinary file Post 369 by me2unix on Wednesday 29th of November 2000 05:49:18 AM
Old 11-29-2000
Hi,

Welcome to the Unix world.

Your question is a bit general..
So I'll start with a tip:
Unix has a command called "file".
you type : file filename
and get seme info what type of file it is...is it text file?
executable? what kind of executable ?

Executable file is a file that can be run and perform some computing task. (hope that's close to the academic definition)

All executable files need to have permission +x turned on in order to be run.

Unlike text files and scripts (files written in readen language which can also be run), executable files are mosty referd to binary files, their content is not readable to humans and contains directions in binary format for the machine to run.

To run an executable file you simply type its name.
to create an executable you need some sort of compiler to create binary code.
For an executable SCRIPT. you should edit your code and follow the format it uses.All scripts first line should start with calling the interpter line like these examples:
#!/usr/bin/perl
#!/bin/sh

Hope that helps,

Hezki
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

newbie question about the "bin" file

Hello, I am new to the Unix/Linux world. This is a typical "for-dummies" question. I was trying to setup Java JDK 1.3 on my Red Hat Linux and downloaded a file called "j2sdk-1_3_1_01-linux-i386.bin" on my usr/src directory. Then I do a "chmod a+x j2sdk-1_3_1_01-linux-i386.bin". Then I tried... (1 Reply)
Discussion started by: jaywang
1 Replies

2. Shell Programming and Scripting

identify whether idrectory or ordinary file

What are the different ways to identify a given file is an ordinary file or a directory? Yes we can do it by giving the command : ls -l <filename> What else? (4 Replies)
Discussion started by: surjyap
4 Replies

3. Shell Programming and Scripting

Executable file

Hi everybody: I have strange problem. I have compiled a source code and created an executable file. This file I can use it into my PC, but when I copy this executable to my laptop this one doesn't work and the system tell me: bash: ./sbdart_unix: cannot execute binary file Somebody can... (3 Replies)
Discussion started by: tonet
3 Replies

4. UNIX for Advanced & Expert Users

How can i read a non text file in unix - ELF-64 executable object file - IA64

The binary file is ELF-64 executable object file - IA64. How i know that the source is Is there any comamnd in unix i can read these kind of files or use a thirty party software? Thanks for your help (8 Replies)
Discussion started by: alexcol
8 Replies

5. Shell Programming and Scripting

executable file

Hi, I want to know that how can i read the content of a .exe file?? Thanks (1 Reply)
Discussion started by: ss_ss
1 Replies

6. UNIX for Dummies Questions & Answers

UNIX newbie NEWBIE question!

Hello everyone, Just started UNIX today! In our school we use solaris. I just want to know how do I setup Solaris 10 not the GUI one, the one where you have to type the commands like ECHO, ls, pwd, etc... I have windows xp and I also have vmware. I hope I am not missing anything! :p (4 Replies)
Discussion started by: Hanamachi
4 Replies

7. Programming

Executable file in C

Hi all, I have modified a C file and executed it. While executing the executable file for that C file, it shows à is cannot be printed. I have given isprint(à) to test it. When I copy the old executable file and execute it it shows it can be printed. Then I retain the C code back and executed it... (1 Reply)
Discussion started by: sivakumar.rj
1 Replies

8. Shell Programming and Scripting

Newbie.. Find if a file exists and open, if not create the desired file..

Hey all, I'm brand new to script writing, I'm wanting to make a script that will ask for a file and then retrieve that file if it exists, and if it doesn't exist, create the file with the desired name, and I'm completely stuck.. so far.. #! bin/bash echo "Enter desired file" read "$file" if ... (5 Replies)
Discussion started by: Byrang
5 Replies

9. Shell Programming and Scripting

wanted to find both link file and ordinary file using single find command

find . -type fl o/p is only the ordinary file. where in it wont give the link files. (2 Replies)
Discussion started by: nikhil jain
2 Replies

10. UNIX for Beginners Questions & Answers

UNIX utility to find difference in folder, file and contents of file against a base version

Hi, I am trying to find out whether there are any Unix utilities that compares folders, files and contents within the file and provides a comprehensive report. The comparison can be against base version of a folder and file with content. Can you please let me know of such a utility? Thanks,... (6 Replies)
Discussion started by: Sripathi_ks
6 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)
All times are GMT -4. The time now is 03:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy