Computational complexity of rm & ls

Chuck Karish karish at forel.stanford.edu
Tue Mar 14 06:11:44 AEST 1989


In article <1541 at zen.UUCP> frank at zen.co.uk (Frank Wales) wrote:
>In article <4461 at pt.cs.cmu.edu> marcoz at MARCOZ.BOLTZ.CS.CMU.EDU (Marco Zagha) writes:
>>In article <9000012 at m.cs.uiuc.edu>, wsmith at m.cs.uiuc.edu writes:
>>> [...]   "rm *" seems to be a common
>>> enough idiom that rm could be optimized to handle that case better.

>Maybe adding a '-A' (for All, harder to type than '-a') option to rm would
>be justified.

Great, another feature!  How about using an alias instead:

	alias rmall 'ls -f | xargs rm -f'

This avoids the overhead of sorting the names in the directory.
It also suppresses those annoying queries from rm.

	Chuck Karish	hplabs!hpda!mindcrf!karish	(415) 493-7277
			karish at forel.stanford.edu



More information about the Comp.unix.questions mailing list