Hello I'm trying to do this shell command "rm -rf test" by doing this:
#include <stdio.h>
#include <stdlib.h>
char name[] = "test";
char buffer[64];
int main()
{
snprintf(buffer,sizeof(buffer),"rm -rf s% s%", name);
system(buffer);
return 0;
}
It will compile and run but doesn't remove the directory
Any help will be greatly appreciated!