#include <stdio.h> #include <string.h> #include <time.h> #include <sys/stat.h > #include <sys/types.h> #include <unistd.h> int main (void) { time_ t now; struct tm *tm_now; char dt[200]; char x=0; time (&now); tm_now = localtime (&now); strftime (dt, 200, " %x %x %y-%m-%d ", tm_now); printf (" now datetime : %s \ n ", dt); char *s = strtok (DT," "); s = strtok (NULL, " "); s = strtok (NULL, " "); coNst char *str = s; mkdir (str, 0777) puts ("Enter X start Move Folder"); x=getchar (); if (x!=0) { pid_t pid = fork (); if (pid == 0) {EXECLP ("mv", "MV", str, "./pass", NULL); return 0;} else{printf ("file has moved \ n");} &NBSP;//&NBSP;EXECLP ("MV", "MV", str, "./pass", NULL); // method 1 } return 0;} /* #include <stdio.h> #include <time.h> int main () { int seconds= time ( time_t*) NULL); printf ("%d\n", seconds); return 0;} */
Another program that can be used interactively to run the environment Linux process program