My code is:
execvp(command, args);
args is char* args[]
command is char* command
for example for ls -l
, command is ls and args is -l but why after executing
execvp(command, args)
I get only result of ls
not ls -l
??
The argument list also contains the name of the program. Make sure that your args
array contains both "ls"
and "-l"
.