#include<stdio.h>
#include <sys/stat.h>
int main ()
{
char wget_cmd[100];
char *pathname="/var/www/html/sssnsd/";
char buf[50];
if(mkdir(pathname, 0777)==-1)
{
perror("mkdir error");
return -1;
}
if (chdir(pathname)<0)
{perror("chdir error");
return -1;
}
getcwd(buf,50);
printf("%s",buf);
sprintf(wget_cmd,"wget -q http://127.0.0.1/snsd.mp4");
system(wget_cmd);
rename();
return 0;
}
#include <sys/stat.h>
int main ()
{
char wget_cmd[100];
char *pathname="/var/www/html/sssnsd/";
char buf[50];
if(mkdir(pathname, 0777)==-1)
{
perror("mkdir error");
return -1;
}
if (chdir(pathname)<0)
{perror("chdir error");
return -1;
}
getcwd(buf,50);
printf("%s",buf);
sprintf(wget_cmd,"wget -q http://127.0.0.1/snsd.mp4");
system(wget_cmd);
rename();
return 0;
}