Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!ncar!noao!asuvax!mcdphx!mcdchg!ddsw1!corpane!sparks From: sparks@corpane.UUCP (John Sparks) Newsgroups: comp.sys.amiga Subject: Re: Moving directories Summary: moving dirs with unix Message-ID: <487@corpane.UUCP> Date: 23 Mar 89 15:41:23 GMT References: <614@ivucsb.UUCP> <11651@umn-cs.CS.UMN.EDU> <363@sagpd1.UUCP> Organization: Corpane Industries, Inc., Louisville Ky Lines: 36 <11719@umn-cs.CS.UMN.EDU> > >>In article <614@ivucsb.UUCP> ivucsb!dan@anise.acc.com (Dan Howell) writes: > >>> > > [example of moving directory on Amiga deleted] > > >>>And voila, no more useless top level directory. Try that on an IBM! > >>> > >>>(and by the way, I also noticed that you can do this on BSD Unix, but not > >>>on Sys V! Why would AT&T do this? Are they trying to be IBM compatible? :-) > >> > >>Sys V requires you be Super User to mv directories. Dunno why, it's > >>a pain. Try this little shell script I wrote on SYS V: # mvdir echo "moving $1 to $2" find $1 -print | cpio -pd $2 # remove the comment on the next line if you want to delete the orig dir. # rm -r $1 # end It will move an entire directory including sub-dirs to the destination directory. Invoke like: mvdir flibit /usr/test will move the dir flibit to /usr/test/flibit Not so hard is it? -- John Sparks | {rutgers|uunet}!ukma!corpane!sparks | D.I.S.K. 24hrs 1200bps ______________| sparks@corpane.UUCP | 502/968-5401 thru -5406 History books which contain no lies are extremely dull.