Let's Rewrite Linux 'ls' command: Starting with C
In this article we will start the first steps to rewrite ls command. If you want to know more about command, please read Part 1.
Note: Source codes can be found at: https://github.com/Miradils-Blog/linux-ls
The easy way Actually, C provides a function to run any OS command, and print its output: system. From the example in the reference, we see that, we can just take arguments from shell and pass it to that function, and it is done.