Though there are multiple files under path "/home/abhijit/Documents/LINUX/editor/" , but I am not getting desired output in "temp" (which should copied all files from editor folder) folder instead output is coming error as : "cp: cannot stat ‘/home/abhijit/Documents/LINUX/editor/*’: No such file or directory".
#include <stdio.h>
#include <unistd.h>
int main( void )
{
char* argv1[10] = { "cp", "-rf", "/home/abhijit/Documents/LINUX/editor/*", "/home/abhijit/Documents/LINUX/temp", 0 };
execvp( argv1[0], argv1 );
}
But if i say as below , it works fine.
char* argv1[MAX_ARGS] = { "cp", "-rf", "/home/abhijit/Documents/LINUX/editor/", "/home/abhijit/Documents/LINUX/temp", 0 };