At a high level, how would you use the execve() function to write a duplicate of the ls program in UNIX? I am doing an exercise to familiarize myself with the exec() family of functions, command-line arguments, and environment variables. I am not familiar with using these concepts, however I know what they do.
Share
The code below can excute
lscommand. Do you mean this?And I wrote a simple
lsdemo for you.my_ls.c
Usage: