how to read a executable file in linux

R

rajin43

Guest
Hi,
how to read the executable bin files in linux.i tried strings command.but that is not much useful.

Regards
Rajini
 


strings displays all readable characters in a file. Likely in this case, there aren't (m)any.
You might wanna try hexdump or od (octal dump).
 
Hi,
how to read the executable bin files in linux.i tried strings command.but that is not much useful.

Regards
Rajini

Code:
hexdump -C filename|less

the character between filename and less is an ascii pipe
 
executable file in linux may be a shell script, python script and so on. You can edit them in text editor.
The most common executable files are binary files consist of zero and one.
But there are still some spec in these files. You can find them by google.
 
executable file in linux may be a shell script, python script and so on. You can edit them in text editor.
The most common executable files are binary files consist of zero and one.
But there are still some spec in these files. You can find them by google.

If the executable in question was a script, the strings command would have been rather useful indeed. However, the question was about an executable bin (binary) file.
 
I'm a java programmer, after compile the .java files, I get the .class files.
The relationship between linux executable file and kernel is just like .class file and jvm.
Jvm read the .class file and fetch the instructions and data form file, then execute the instructions.
The .class file have its spec, so does the linux executable file.
Follow this link:http://en.wikipedia.org/wiki/Executable_and_Linkable_Format
If you know about the assembler, you may understand it.
 
You can use the hex editor to view the bin file.
Like echo "hello" command in the shell script file , the hex string 0x0011 0x12FF in bin executable file may indicates to output the data to console(the 0x0011 represent the instruction, and the 0x12FF may be the address of the data in the memory).
echo "hello"
0x0011 0x12FF
 


Top