View Full Version : how can I find wc command's source code?

August 22nd, 2006, 11:18 AM
I want to view wc command's source code, how can I find the source?


August 22nd, 2006, 11:25 AM
somebody know it?

August 22nd, 2006, 11:38 AM
Check the source of GNU's coreutils: http://www.gnu.org/software/coreutils/

August 22nd, 2006, 01:28 PM
The Debian/Ubuntu way of doing this:
- Find the executable.
- Find the package.
- Cd into a directory.
- Download the source directly.

14:26:47 ifokkema@5-HKG-02-0098:~$ which wc
14:26:56 ifokkema@5-HKG-02-0098:~$ dpkg -S /usr/bin/wc
coreutils: /usr/bin/wc
14:27:12 ifokkema@5-HKG-02-0098:~$ cd src
14:27:25 ifokkema@5-HKG-02-0098:src$ sudo apt-get source coreutils

If you get:

E: You must put some 'source' URIs in your sources.list
Then you must enable the deb-src lines in your /etc/apt/sources.list file.


September 1st, 2006, 08:38 PM
Hi, ifokkema,
Very nice.

Thank you for you help!