Path: utzoo!utgpu!watserv1!watmath!att!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!ucsd!ucrmath!yakker From: yakker@ucrmath.ucr.edu (matt robinson) Newsgroups: comp.unix.questions Subject: Re: mv'ing files from a C program Message-ID: <10002@ucrmath.ucr.edu> Date: 19 Nov 90 07:37:12 GMT References: <22@mixcom.UUCP> Sender: news@ucrmath.ucr.edu Distribution: na Organization: University of California, Riverside Lines: 18 In article <22@mixcom.UUCP> ggvvgg@mixcom.UUCP (Dave Fenske) writes: ->Is there an easy way to do an 'mv' from a C program? -> You might want to try out using rename(1). Note that I believe this only works if you are within the same partition, and it may not follow all symbolic links. There's a barrage of error returns from a rename(), so take a look at what is in the manual. (Sun has a massive list of return codes from this call.) Hope this helps. --Matt ______________________________________________________________________________ Matt D. Robinson "...if I only had a brain..." Systems Programming Group, UC Riverside -- The Scarecrow, The Wizard Of Oz Internet : yakker@ucrmath.ucr.edu UUCP : ..!ucsd!ucrmath!{yakker,source}