Skip to content

Instantly share code, notes, and snippets.

View dere7's full-sized avatar
🎯
Focusing

Dereje Desta dere7

🎯
Focusing
View GitHub Profile

How shell executes ls -l *.c

shell_image In this post we'll talk about how shell executes command ls -l *.c. Moreover, we'll also discus how it is implemented under the hood.

We strongly advise you to have at least fundamental knowledge of C programming language and Linux system programming before you continue.

Note that we skipped many error check and memory management for brevity which are must be included in working version of the code. Refer here for implemention.

When we open a shell(users perspective) it prompts us to enter a line of command and when we enter the command it executes our command and it prompts us to enter another command.