Tuesday, May 7, 2024
 Popular · Latest · Hot · Upcoming
15
rated 0 times [  15] [ 0]  / answers: 1 / hits: 1768  / 1 Year ago, thu, march 16, 2023, 7:49:32

I've noticed that most of my commands/programs in the /bin directory are compiled. I wish to duplicate this non-readable code format myself. Can someone tell me why and/or how these programs get this way?



[green stamp bonus]: Isn't there a bash command to print all of the "human readable" text from a file?


More From » bash

 Answers
0

The commands/programs in /bin are not non-readable, but they are, as you say, compiled. This means that they were originally written in C (or some other programming language) and have been compiled to machine code (binary) so the processor can execute the code. To do the same, simply write the program you need in C and run the gcc command to produce an executable file.



To print any human readable text in a files use strings < /bin/file,


[#36034] Friday, March 17, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
emuralm

Total Points: 290
Total Questions: 111
Total Answers: 117

Location: China
Member since Thu, Sep 1, 2022
2 Years ago
emuralm questions
;