From mboxrd@z Thu Jan 1 00:00:00 1970 From: f3d27b@gmail.com (Wang Lei) Date: Thu, 21 Jun 2012 23:22:49 +0800 Subject: download the source code of some commands In-Reply-To: (=?utf-8?B?IueOi+WTsiIncw==?= message of "Thu, 21 Jun 2012 20:48:48 +0800") References: Message-ID: <4fe33c55.83da440a.4026.ffffc75b@mx.google.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org 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. 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