How to get the source code of command line ?
I just want to see how the command line such as : "cat", "split", "ls"...ect source code ? Are they written in C or other language ? I don't know where to search those :( ? Anyone could help me out ? Thanks in advance ;) !
|
I usually use codesearch.google.com to have a look at the source.
I did a search for you http://www.google.com/codesearch/p?h...ard%20Stallman |
Remember also that bash (and other shells) also provides some built-in commands that can supersede the stand-alone ones usually found in /bin.
|
Many commands are provided by the coreutils package: you can start by downloading the coreutils source tarball and start from there. As already mentioned by David the H. some statements are BASH built-ins, hence you have to look at the BASH source code. And yes, the Linux operating system is written in C as well as most of the common utilities. If you're not sure what a command is (shell script, shell built-in, external command) you can try type.
Code:
$ type type |
Quote:
|
Thanks a lot guys ;) ! Much more than I respected :D !
|
Google Is the Best place to start looking ... I am sure - with just the right amount of patience - you'll hit jackpot.
:) Linux Archive |
All times are GMT -5. The time now is 10:27 PM. |