Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!gatech!sbmsg1!itm!danny From: danny@itm.UUCP (Danny) Newsgroups: comp.unix.questions Subject: Re: Computational complexity of rm & ls Message-ID: <1280@itm.UUCP> Date: 14 Mar 89 13:45:47 GMT References: <9000012@m.cs.uiuc.edu> <4461@pt.cs.cmu.edu> <1541@zen.UUCP> <871@Portia.Stanford.EDU> Reply-To: danny@itm.UUCP (Danny) Organization: In Touch Ministries, Atlanta, GA Lines: 25 In article tale@pawl.rpi.edu writes: ~Invoking ls to pipe to xargs which calls rm is not the ~optimum strategy. The best "stragety" (thanks, Bugs) I've ever heard of is: use clri to zap the directory, and fsck to clean up the mess. The story began with a news-passing scheme which saved articles as files in a directory to be passed to another machine. When said machine was down, the directory grew. Gatech had literally thousands of files to be sent, so, they either copied them to tape, or said, "Forget it!" Then came the rm. It ran overnight, and was still far from done. One of the gurus from MSDC (Hi Dan!) suggested the above idea, which took about 10 minutes. Ok, ok, you do have to unmount the partition, but, even so, quadratic it ain't. WARNING! Not for the faint-of-heart! "Experience and informed courage count for much." - from someplace in the Version 7 man pages, dealing with addled file systems. Danny -- Daniel S. Cox (seismo!gatech!itm!danny)