Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!batcomputer!rpi!rpi.edu!tale From: tale@pawl.rpi.edu (David C Lawrence) Newsgroups: comp.unix.questions Subject: Re: Computational complexity of rm & ls Message-ID: Date: 13 Mar 89 22:05:00 GMT References: <9000012@m.cs.uiuc.edu> <4461@pt.cs.cmu.edu> <1541@zen.UUCP> <871@Portia.Stanford.EDU> Sender: usenet@rpi.edu Reply-To: tale@pawl.rpi.edu Organization: The Octagon Room Lines: 22 In-reply-to: karish@forel.stanford.edu's message of 13 Mar 89 20:11:44 GMT In article <9000012@m.cs.uiuc.edu>, wsmith@m.cs.uiuc.edu writes: wsmith> [...] "rm *" seems to be a common wsmith> enough idiom that rm could be optimized to handle that case better. In article <1541@zen.UUCP> frank@zen.co.uk (Frank Wales) wrote: FW>Maybe adding a '-A' (for All, harder to type than '-a') option to rm would FW>be justified. In article <871@Portia.Stanford.EDU> karish@forel.stanford.edu (Chuck Karish) writes: CK> Great, another feature! How about using an alias instead: CK> CK> alias rmall 'ls -f | xargs rm -f' CK> CK> This avoids the overhead of sorting the names in the directory. CK> It also suppresses those annoying queries from rm. By your own quoting, Chuck, the reason Frank suggested -A was for optimization. Invoking ls to pipe to xargs which calls rm is not the optimum strategy. -- tale@rpitsmts.bitnet, tale%mts@rpitsgw.rpi.edu, tale@pawl.rpi.edu