Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!linus!philabs!micomvax!musocs!mcgill-vision!mouse From: mouse@mcgill-vision.UUCP (der Mouse) Newsgroups: comp.unix.wizards Subject: Re: stupidity in directory management? Message-ID: <851@mcgill-vision.UUCP> Date: Mon, 3-Aug-87 03:53:45 EDT Article-I.D.: mcgill-v.851 Posted: Mon Aug 3 03:53:45 1987 Date-Received: Fri, 14-Aug-87 01:28:17 EDT References: <603@nonvon.UUCP> <23047@sun.uucp> <1826@vax135.UUCP> Distribution: na Organization: McGill University, Montreal Lines: 34 In article <1826@vax135.UUCP>, whb@vax135.UUCP (Wilson H. Bent) writes: > In article <23047@sun.uucp> guy%gorodish@Sun.COM (Guy Harris) writes: >> [stuff about filling up directories and then deleting files] > The method I use to 'shrink' a directory [is] > cd (parent of jumbo) > find jumbo -depth -print | cpio -pdlm teensy > rm -r jumbo > mv teensy jumbo # just to get the names right! > Of course, I've yet to find a BSD find which understands "-depth"... Great poslfit, what's wrong with cd (parent of jumbo) mkdir teensy mv jumbo/* teensy rmdir jumbo mv teensy jumbo which works durn near everywhere? If you have dot files in jumbo you may have to add mv jumbo/.??* teensy (though that would miss files matching .?). If want to be really safe, you could do ls -f -1 jumbo | sed -e '1,2d' | sed -e 's;.*;mv jumbo/& teensy;' | sh though that strikes me as probably being overkill. der Mouse (mouse@mcgill-vision.uucp)