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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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'
Last edited by PTrenholme; 01-01-2011 at 01:21 PM.
Reason: Added example
i just want to know,how can we edit the files of /bin folder.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.