Path: utzoo!attcan!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!osu-cis!n8emr!uncle!jbm From: jbm@uncle.UUCP (John B. Milton) Newsgroups: comp.sys.att Subject: Re: mvdir: where is it, how can I get it? Message-ID: <333@uncle.UUCP> Date: 17 Sep 88 05:33:51 GMT References: <15911@shemp.CS.UCLA.EDU> Reply-To: jbm@uncle.UUCP (John B. Milton) Organization: Just me and my computer, Columbus Ohio Lines: 33 In article <15911@shemp.CS.UCLA.EDU> cc1@CS.UCLA.EDU (Michael Gersten) writes: ... >***** mvdir was NOT included on the 3b1 ***** >Why not? WHere can I get it? >Now, its not the absolute end of the world. I can put in ~/bin the >following little thing > >main(argc,argv) char **argv; >{ > link (argv[1], argv[2]); > unlink (argv[1]); >} > >, add some checks, and make it 6777, owned by root, in a directory only 6777, now really! You need to think about the . and .. entries. You need to think about what happens to ANY process using any of the involved directories (open or as PWD). It is not as trivial as it sounds. SYSV DOES NOT LIKE to have . and .. out of whack ever. It may work for you and crash another system. The safe way to move a directory tree in SYSV is to use: find . -print|cpio -p dir read up on the -p to get the flavor right John -- John Bly Milton IV, jbm@uncle.UUCP, n8emr!uncle!jbm@osu-cis.cis.ohio-state.edu home: (614) 294-4823, work: (614) 459-7641; CP/M to MP/M, MS-DOS to OS/2