fixing rm * (was: Worm/Passwords)
Charlie Geyer
charlie at mica.stat.washington.edu
Thu Nov 24 14:03:21 AEST 1988
In article <2508 at aplcomm.jhuapl.edu> trn at aplcomm.jhuapl.edu (Tony Nardo)
writes:
>In article <1067 at entropy.ms.washington.edu> charlie at mica.stat.washington.edu
>(Charlie Geyer) writes:
>>This is all very easy. If you don't like rm(1) put
>>
>> alias foo rm -i
>>
>>in your .cshrc...
>
>A half-measure. If you *really* don't like rm(1), put
>
> alias rm "rm -i"
>
>in your .cshrc file. That way, if you want to use rm without the -i switch,
>you have to do a little extra work (/bin/rm). By the same token,
>
> alias cp "cp -i"
>
>can protect you from yourself with file copying.
Ah yes. Well actually I do have
alias rm rm -i
alias cp cp -i
alias mv mv -i
set noclobber
in all of my .cshrc files. I just didn't want to *recommend* such a
practice knowing I'd get flamed for it. Only once or twice have I
forgotten with a new account that I haven't set these aliases *yet*.
It is a bit of a pain embedding /bin/rm and /bin/mv in c-shell
scripts I write. Can anyone tell me if this is nonportable? Don't tell
me that if I would just write Bourne shell scripts that I wouldn't have to
worry about the stupid alias. I know that. Also don't tell me the c-shell
is nonportable.
More information about the Comp.unix.wizards
mailing list