mv'ing files from a C program

Conor P. Cahill cpcahil at virtech.uucp
Sat Nov 24 23:34:22 AEST 1990


In article <1990Nov21.061700.20005 at mercury.cair.du.edu> rwelch at diana.cair.du.edu (RANDY S WELCH) writes:
>Isn't invoking a shell a bit much to mv a file when you can
>link(2)/unlink(2)?  

Yes it is.  However, if the files are not on the same file system you 
cannot do a link/unlink.  The fork/exec of mv was the last of three 
examples of how you could do the move without having to have your program
explicitly copy the file (requirement of original poster).

-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.,
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170 



More information about the Comp.unix.questions mailing list