Calling 'ls' with execv
问题 I am new to system calls and C programming and am working on my university assignment. I want to call the 'ls' command and have it print the directory. What I have: (I have added comments in so you can see what I see coming through each variable. int execute( command* cmd ){ char full_path[50]; find_fullP(full_path, p_cmd); //find_fullP successfully updates full_path to /bin/ls char* args[p_cmd->argc]; args[0] = p_cmd->name; int i; for(i = 1; i < p_cmd->argc; i++){ args[i] = p_cmd->argv[i]; }