Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!haven!uvaarpa!virginia!uvacs!rwl From: rwl@uvacs.cs.Virginia.EDU (Ray Lubinsky) Newsgroups: comp.unix.questions Subject: Re: cleaning a directory Message-ID: <3042@uvacs.cs.Virginia.EDU> Date: 25 Mar 89 17:04:01 GMT References: <4218@omepd.UUCP> Organization: U.Va. CS in Charlottesville VA Lines: 23 In article <4218@omepd.UUCP>, merlyn@intelob.intel.com (Randal L. Schwartz @ Stonehenge) writes: > $deadmeat=`pwd` > cd / > rm -rf $deadmeat > mkdir $deadmeat > chmod $someprotection $deadmeat > > No big deal. No passing of arguments to rm, and no need to worry > about .* files and files containing spaces and returns (yup, it's > pathological, but I worry sometimes...). Another advantage to your method is that sometimes directory files get quite large if they have had a large number of filenames within them. Removing and recreating the directory itself will let you pare down the directory file to the smallest size possible. x -- | Ray Lubinsky rwl@trinity.cs.virginia.edu (Internet) | | rwl@virginia (BITnet) | | Department of Computer Science, ...!uunet!virginia!uvacs!rwl (UUCP) | | University of Virginia (804) 979-6188 (voice) |