mv'ing files from a C program
Gary Weimer
weimer at ssd.kodak.com
Fri Nov 16 05:33:59 AEST 1990
In article <1990Nov15.132952.11932 at virtech.uucp> cpcahil at virtech.UUCP (Conor P. Cahill) writes:
>You don't have to use system(3), you can use fork/execl(2) (or one of it's
>family of functions) as follows:
>
> if( fork() == 0 )
> execl("/bin/mv","mv",oldfile,newfile,(char *)0);
> else
> wait((int *)0);
That's just about exactly what system(3) does. (i.e. you gain nothing for
all the added code)
More information about the Comp.unix.questions
mailing list