Path: utzoo!utgpu!watserv1!watmath!att!mcdchg!ddsw1!corpane!disk!stevenw From: stevenw@disk.UUCP (Steven Weller) Newsgroups: comp.os.os9 Subject: Re: pd software/unix utils Keywords: os9 unix utilities Message-ID: <3919@disk.UUCP> Date: 14 Aug 90 13:06:01 GMT References: <1990Aug7.185337.4532@cs.utk.edu> <2394@mcrware.UUCP> <3300@rwthinf.UUCP> Organization: Digital Information Systems of Ky (DISK), Louisville, Ky Lines: 26 Re: Unix mv utility: It is not necessary to use system calls if all you want to do is copy-then-delete. Simply write a program mv that collects all its command-line parameters asnd forks copy with them. If that is successful (ONLY if it is successful !) fork del to delete the file(s) with appropriate arguments. The Unix mv does some clever things: it moves the references to the data, not the data itself. This is where the problems occur on OS-9. Several processes can try to do this at once, resulting in a damaged file structure. The solution (I have not tried this) is to use record locking. If you consult the technical manual, you find that the record locking facilities of RBF are quite comprehensive. The mv utility must lock out all the files (i.e. directories and files) conerned with the operation, do the critical work, then close all the files. -- : Phone: (502) 425 9560 << Steven Weller >> Fax: (502) 426 3944 : : Windsor Systems, 2407 Lime Kiln Lane, Louisville, KY, 40222 USA : : "A substance almost, but not quite, entirely unlike tea" : : stevenw@disk.UUCP or uunet!ukma!corpane!disk!stevenw :