From: utzoo!decvax!harpo!npoiv!npois!cbosgd!mark Newsgroups: net.followup Title: Re: More directory junk Article-I.D.: cbosgd.2922 Posted: Wed Dec 29 12:16:21 1982 Received: Thu Dec 30 04:27:24 1982 Reply-To: mark@cbosgd.UUCP (Mark Horton) References: alice.1351 A few notes are in order. Many systems do not have cpio, since it's a USG program. 4.1BSD and V7 do not have it, but have tar instead. Back to back tars can be used to copy heirarchies in place of a find|cpio. tar is also present on USG systems. Methods that compact directories such as /usr/spool/uucp by moving the directory out of place, copying the heirarchy into a fresh directory, and removing the old copy will fail if the filesystem is nearly full and the spool directory is large. A simple method I often use by hand (I don't have a debugged shell script) looks something like this: cd /usr/spool mv uucp ouucp mkdir uucp mv ouucp/* uucp rmdir ouucp This is not recursive, but is simple, fast, and doesn't require much scratch space. If you have a USG system and the directory contains subdirectories, it won't work since mv won't move directories.