Newbie question about difference between executable file and ordinary file

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Newbie question about difference between executable file and ordinary file
# 1  
Old 11-28-2000


I am newbie in unix and just started learning it. I want to know what is the difference between an executable file and a file (say text file). How to create executable file? What is the extension for that? How to differentiate ? How does it get executed?


# 2  
Old 11-29-2000

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 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:

Hope that helps,

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
Login or Register to Ask a Question