Explain what happens when you run ls
GoogleSoftware Engineer · Technical ScreenLast updated
This question evaluates a candidate's understanding of process creation and execution, shell command resolution, kernel and VFS filesystem interactions, and how directory entries and file metadata are retrieved; category/domain: Software Engineering Fundamentals.
In Linux, explain the end-to-end flow of what happens when a user types ls in a shell and presses Enter.
Include:
- What the shell does
- How the executable is found and started
- Key system calls / kernel filesystem interactions
- How directory entries and file metadata are retrieved
- What changes for common flags like
-l,-a, and-R
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.