LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-28-2011, 07:48 AM   #1
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 610

Rep: Reputation: 31
What is Binary File ?


Hello,
I want to know that what are binary files in Linux. What are its purpose to make file binary?

thanks
garden
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 04-28-2011, 08:11 AM   #2
omgs
Member
 
Registered: Dec 2010
Posts: 64

Rep: Reputation: 6
A binary file is a "non-human" readable file, i.e., code to be interpreted by the OS or any app, not to be read. Just think as the opposite for a text file. You can use the "file" command on any file to get its type.
 
2 members found this post helpful.
Old 04-28-2011, 08:32 AM   #3
sibe
Member
 
Registered: Apr 2011
Location: Jakarta, Indonesia
Distribution: Fedora, CentOS
Posts: 122

Rep: Reputation: 21
Hi,

Machines speak binary, any other language would have to be translated before any machine could understand what it means to them. For example; if I say "halo, apa kabar" to you, the words need to be translated to "hello, how are you" before you can give an answer to me. The sole purpose of translating programming languages to binary is to communicate; to be able to understand each other's way of speak, read, write and execute.

But why binary? Why not English? Why not even C?

The answer to those questions is lying under our hardware's top case. Down there inside the memory, there are rooms for only two states of electricity; whether electric currents are present, or whether they are not, at any given time. A fancy loop of C codes would have to be translated in some way to represent either state of the electricity on the hardware.

I am not a binary expert, but I hope this will bring some light into it.

Last edited by sibe; 04-28-2011 at 08:37 AM.
 
1 members found this post helpful.
Old 04-28-2011, 08:35 AM   #4
lupusarcanus
Senior Member
 
Registered: Mar 2009
Location: USA
Distribution: Arch
Posts: 1,022
Blog Entries: 19

Rep: Reputation: 146Reputation: 146
http://en.wikipedia.org/wiki/Binary_file
http://en.wikipedia.org/wiki/Executable
http://en.wikipedia.org/wiki/Binary_code
http://www.linfo.org/binary_file.html
man -k binary

Binary files in Linux are often compiled C/C++ code.
 
2 members found this post helpful.
Old 04-28-2011, 10:46 AM   #5
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 17.0 at present.
Posts: 1,167

Rep: Reputation: 201Reputation: 201Reputation: 201
I think it would be fair to say that binary files are machine code files, where source code files are files editable under whatever language they were written in; C, C+, C#, Fortran, Pascal, etc. (OK, I'm probably wrong in that some languages require a run-time environment to be executed in, and therefore are actually at some intermediate stage. Java for instance.)

In general, under Linux, binaries are machine code executable files.

Microsoft only supplies software as binaries, i.e. you can't change anything, it's "as is", Like it or Lump it!

So... That's my understanding as a non-programmer. Hopefully someone who "bit-fiddles" for a living can correct any of my misconceptions.


Play Bonny!

Last edited by Soadyheid; 04-28-2011 at 10:49 AM.
 
2 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help: Opening GenICs binary file, writing to binary file for GADGET-2 (in C) parallax147 Programming 0 10-05-2010 12:06 PM
scp truncate text file busy - copying file is not a running binary jetberrocal Linux - Server 3 06-24-2010 04:56 PM
[SOLVED] How would I convert an arbitrary binary file into a Linux executable file? ootawata Programming 8 02-22-2010 12:21 AM
Bash File Name Matching - Binary file .ogg matches !!! maxvonseibold Linux - General 8 01-30-2007 07:31 PM
convert text file to binary excel file ust Linux - General 2 11-23-2004 03:33 AM


All times are GMT -5. The time now is 05:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration