download the source code of some commands

王哲 wangzhe5004 at gmail.com
Thu Jun 21 11:46:21 EDT 2012


2012/6/21 Wang Lei <f3d27b at gmail.com>

> If you use Debian or other distribution with apt package system.
>
> You can use whereis to locate this command.
> [~]$ whereis halt
> halt: /sbin/halt /usr/share/man/man5/halt.5.gz
> /usr/share/man/man8/halt.8.gz
>
> Then, use dpkg -S to show which package it's included. This one is:
> sysvinit.
> [~]$ dpkg -S /sbin/halt
> sysvinit: /sbin/halt
>
> Now, you can download the source from Debian source, use:
> [~]$ apt-get source sysvinit
>
> Or if you want the original source, use aptitude (or apt-cache) find
> it's homepage.
> [~]$ aptitude show sysvinit
> Package: sysvinit
> ......
> Homepage: http://savannah.nongnu.org/projects/sysvinit
>
> At last, get it from there. As for other package systems, I think there
> should be a way too. Or you can google.
>

   Thank you very much !  i follow your steps, and download the source code
successfully.

On 2012-06-21 20:48:48 +0800, 王哲 wrote:
>   Hi all:
>        I want to see some source code of some commands,for
> example,halt,reboot,uptime,and so on.
>
> but i don't kown where to download?   can you give me some advice?
>
> Thanks in advance!

> > _______________________________________________
> > Kernelnewbies mailing list
> > Kernelnewbies at kernelnewbies.org
> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
> --
> Regards,
> Lei
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120621/6e586022/attachment.html 


More information about the Kernelnewbies mailing list