Path: utzoo!utgpu!watmath!clyde!att!pacbell!lll-tis!mordor!joyce!sri-unix!quintus!ok From: ok@quintus.uucp (Richard A. O'Keefe) Newsgroups: comp.unix.wizards Subject: Re: fixing rm * (was: Worm/Passwords) Message-ID: <684@quintus.UUCP> Date: 16 Nov 88 03:41:29 GMT References: <22401@cornell.UUCP> <4627@rayssd.ray.com> <8563@rpp386.Dallas.TX.US> <125@embossed.UUCP> <672@quintus.UUCP> <1232@atari.UUCP> Sender: news@quintus.UUCP Reply-To: ok@quintus.UUCP (Richard A. O'Keefe) Organization: Quintus Computer Systems, Inc. Lines: 25 In article <1232@atari.UUCP> achar@atari.UUCP (Alan Char) writes: >In article <672@quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes: >|Moral: you can't change _one_ thing. >Actually, you can change the shell. (Nowadays, that's more like three to >five things.) For example, I would REALLY appreciate in csh a variable > set expandcheck=5 >Comments on this idea? --Alan Well, there _is_ such a feature already, except that the limit is rather high, and you can't change it (:-). BSDish systems impose a limit of 10,240 bytes of argv[]; this seems to include the pointers, so you can't pass more than about 2000 files to any command (hence xargs(1)). The trouble is that I can't think of a reasonable number for the limit: I do "egrep foo $dirs/*.c" (rummaging around in dozens of files) often enough that I'd find it a nuisance to have to clear a small limit. If you are doing something non-destructive to the files, you usually don't want a limit, it's only if you're over-writing or destroying the files that you have a problem. And expandcheck _still_ wouldn't stop find . ! -user $LOGNAME -exec rm {} \; {remove all files not owned by me in the current subtree} -- forget the "!" and you lose big. The standard trick for csh is alias rm "/bin/rm -i"