Some versions of pwd are internal to the shell, and thus do not
need to be executed as a separate process. The command executes so
fast you are unlikely to see it on a list of processes, anyway.
Here is a very crude test to show that pwd. when a separate
binary, does in fact create a new process. It consists of two
scripts with an infinite loop, one constantly running pwd, the
other running PS -A and grepping for the word pwd. You will need to
console displays or two terminals to test this. Slowly but surely,
the script checking for pwd will spit out instances of pwd being
run or exiting (defunct).
#/bin/sh
#This script constantly runs pwd. Kill with Ctrl - C
COUNTER=1
while [ $COUNTER -lt 2 ]; do
/bin/pwd
done
#/bin/sh
#This script constantly runs PS -A|grep pwd. Kill with Ctrl -
C
COUNTER=1
while [ $COUNTER -lt 2 ]; do
PS -A | grep pwd
done