Can some one provide me a detailed description of what happens when you execute the "ls" command in linux. What system calls are used? What does the file system do? Obviously depending on which file system is used. Is someone can provide an in depth discussion on this topic or point me to some good resources that would be great! Thanks!
- current process (we call parent process, or parent) find ls in $PATH variable,eg /usr/bin/ls
- parent(process) fork a child( process), and pass all enviroment, child process image is /usr/bin/ls
- without arguments, so child find env
PWD, eg /foo/bar and excute (/usr/bin/ls /foo/bar)
- child process output , exit
- parent become interactive again