You are not logged in.
Pages: 1
I'd like learning some unix/linux C programming tricks from the sources of the smaller but extra useful programs.
How can I download and browse the source of programs like 'ls', 'file', 'which'?
Be very verbose, I am a newbie of programming... :S
Thanks a lot.
Offline
Install the cvsup package and execute "abs". This will download PKGBUILDs for all arch packages in the current and extra repositories. Then you choose a package, let's choose coreutils now:
cd /some/working/dir
cp -r /var/abs/base/coreutils .
cd coreutils
makepkg -o
Now the sources for coreutils package are in the src/coreutils-X.Y.Z subdirectory. You can do the same for any other arch package to get its sources.
Offline
btw. coreutils sources really suck, the indentation used is really insane
Offline
thanks a lot, I'll try soon.
Offline
Check out OpenBSDs CVS-tree. That's from where I'm learning.
Sebastian A. Liem
Offline
Pages: 1