Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

While some systems include a "cd" binary, it's basically useless since it just changes its own working directory and then exits.

Instead, "cd" commands are generally parsed and executed by your shell (/bin/sh or similar) directly so that the shell's working directory gets changed and you can run subsequent commands in the new location.

"ps" on the other hand is indeed just a normal program. Usually it reads files in /proc to figure out which processes are running.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: