<br><br><div class="gmail_quote">2012/6/21 Wang Lei <span dir="ltr"><<a href="mailto:f3d27b@gmail.com" target="_blank">f3d27b@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If you use Debian or other distribution with apt package system.<br>
<br>
You can use whereis to locate this command.<br>
[~]$ whereis halt<br>
halt: /sbin/halt /usr/share/man/man5/halt.5.gz /usr/share/man/man8/halt.8.gz<br>
<br>
Then, use dpkg -S to show which package it's included. This one is: sysvinit.<br>
[~]$ dpkg -S /sbin/halt<br>
sysvinit: /sbin/halt<br>
<br>
Now, you can download the source from Debian source, use:<br>
[~]$ apt-get source sysvinit<br>
<br>
Or if you want the original source, use aptitude (or apt-cache) find<br>
it's homepage.<br>
[~]$ aptitude show sysvinit<br>
Package: sysvinit<br>
......<br>
Homepage: <a href="http://savannah.nongnu.org/projects/sysvinit" target="_blank">http://savannah.nongnu.org/projects/sysvinit</a><br>
<br>
At last, get it from there. As for other package systems, I think there<br>
should be a way too. Or you can google.<br></blockquote><div class="h5"><br> Thank you very much ! i follow your steps, and download the source code successfully.<br> <br>
On 2012-06-21 20:48:48 +0800, ÍõÕÜ wrote:<br>
> Hi all:<br>
> I want to see some source code of some commands,for<br>
> example,halt,reboot,uptime,and so on.<br>
><br>
> but i don't kown where to download? can you give me some advice?<br>
><br>
> Thanks in advance!<br>
</div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im">> _______________________________________________<br>
> Kernelnewbies mailing list<br>
> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br>
--<br>
</div>Regards,<br>
Lei<br>
</blockquote></div><br>