Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Welcome to LinuxQuestions.org, a friendly and active Linux Community.

You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

Usually the man page for a given command gives you some info about the package it's in. For example, for mkdir, the package is coreutils. So, you can go to the web page for coreutils (google it) and obtain the source code.

Edit: there may be package manager specific ways of getting the information too, as well as just googling the executable name, obviously.

Also, I'm not sure what this has to do with servers, so I've reported it to be moved to a more suitable place.

If you really want to "find the text" in an elf file, use the strings command; it you want to see everything in a file, with strings readable, use the hexdump -C command. If you want to actually see the source code for the command, download it from the source repository for your distribution.

For your specific example, the generic source code would (probably - I haven't checked this) be in the GNU archive or the Linux kernel archives.

If, on the other hand, you just want to know how to use some command, the command invoked with a -h or --help option will often (but not always) suffice, the man command will usually show more information, and the info command (or pinfo if you've installed it) sometimes gives you even more info.

For example:

Code:

$ mkdir --help
Usage: mkdir [OPTION]... DIRECTORY...
Create the DIRECTORY(ies), if they do not already exist.
Mandatory arguments to long options are mandatory for short options too.
-m, --mode=MODE set file mode (as in chmod), not a=rwx - umask
-p, --parents no error if existing, make parent directories as needed
-v, --verbose print a message for each created directory
-Z, --context=CTX set the SELinux security context of each created
directory to CTX
--help display this help and exit
--version output version information and exit
Report mkdir bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
For complete documentation, run: info coreutils 'mkdir invocation'

for ex: we have a file named mkdir which is being executed when we run the mkdir command at the terminal.

I just want to read the code inside that mkdir file. That binary file has to be converted to text,which should be human readable.

Please post your suggestions.

Thanks in advance,
Dinesh.

Be careful what you wish for; you might just get it.

notes

'Human Readable' does not imply 'Human Comprehensible'

Even if you got 'Human Comprehensible', it wouldn't necessarily help you with your objectives, if they are to do something different from what is currently occuring

please understand PTrenholme's post (which is very helpful, considering your exact questions, but I suspect that you haven't actually asked for the things that will really help you achieve your aim, whatever that is), and the implications thereof, and tell us more about your actual problem