Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
11-10-2007, 03:20 PM
|
#1
|
Member
Registered: Jul 2005
Distribution: Fedora fc4, fc7, Mandrake 10.1, mandriva06, suse 9.1, Slackware 10.2, 11.0, 12.0,1,2 (Current)]
Posts: 732
Rep:
|
Source code for GNU utils?
hi, do you happen to know where can I find the source code for stuff like : the cp command? or any other commands such as mv or grep, etc?
I just want to see how these stuff were implemented, which is fascinating !
Thanks
|
|
|
11-10-2007, 03:30 PM
|
#2
|
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464
Rep: 
|
Did you not think about going to the GNU website? cp, mv and friends are part of GNU Coreutils and grep, is well, GNU grep. Try googling to find a project's homepage and you'll be able to download the source from there.
|
|
|
11-10-2007, 03:34 PM
|
#3
|
Member
Registered: Jul 2005
Distribution: Fedora fc4, fc7, Mandrake 10.1, mandriva06, suse 9.1, Slackware 10.2, 11.0, 12.0,1,2 (Current)]
Posts: 732
Original Poster
Rep:
|
Thanks, I've seen it only after I posted.
Thanks anyways./
|
|
|
11-10-2007, 03:59 PM
|
#4
|
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530
Rep:
|
On a debian-based distro, you can do it like this: - Make sure the source repositories are enabled in your /etc/apt/sources.list
- Find out which package provides the program in question:
Code:
dpkg -S $(which mv)
- Install source:
Code:
apt-get source packagename
|
|
|
11-11-2007, 12:19 PM
|
#5
|
Member
Registered: Jul 2005
Distribution: Fedora fc4, fc7, Mandrake 10.1, mandriva06, suse 9.1, Slackware 10.2, 11.0, 12.0,1,2 (Current)]
Posts: 732
Original Poster
Rep:
|
I couldn't find the sources for other stuff I was looking like ps,
I'd be happy if you could guide me which package to look for the ps code, since I can't find it 
|
|
|
11-11-2007, 12:40 PM
|
#6
|
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464
Rep: 
|
procps. Looking at man pages usually helps, too  .
|
|
|
11-11-2007, 12:43 PM
|
#7
|
HCL Maintainer
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450
Rep:
|
Quote:
Originally Posted by itz2000
I'd be happy if you could guide me which package to look for the ps code, since I can't find it 
|
Dude, just use your package manager (supposing you use one). It will be able to tell you what files belong to which package (matthewg42 gave some instructions for dpkg-based distros). Incidentally, on most linux distros, ps comes from the procps package.
|
|
|
All times are GMT -5. The time now is 12:19 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|