Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char *new_file_path = malloc(strlen(file_from_list_path[buff_ind]) + 20);
- sprintf(new_file_path, "%s%s", file_from_list_path[buff_ind], get_time(last_modification));
- int proc = fork();
- if(proc == 0){
- execl("/bin/cp", "cp", file_from_list_path[buff_ind], new_file_path, (char *) 0);
- exit(-1);
- }else{
- waitpid(proc,NULL,0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement