Take /usr/bin/free as example rpm -qf `which free` Search on Google for procps Download it and untar. free.c is found in /usr/src/redhat/SOURCES/procps-3.2.7 or Search on koders.com for file:free.c or use command header literal string enclosed in printf and search on Google, e.g. printf("total used free shared buffers cached\n");