rm problem

utzoo!decvax!ucbvax!unix-wizards utzoo!decvax!ucbvax!unix-wizards
Fri Oct 2 00:49:16 AEST 1981


>From menlo70!hao!woods at Berkeley Fri Oct  2 00:44:13 1981
   The systems guy here solved the 'rm' problem by creating
a shell script 'del' and encouraging all non-hacker type users to use
it instead of rm. (Being a scientific research facility, most of our
users fall into that category). What 'del' does is a foreach f($argv)
and then prints $f, asks the user to type 'y' to remove, and if the
response is 'y' then it does an rm -f $f. A response of 'q' terminates
the command, and any other response simply moves on to the next file,
leaving that file alone. This way we get the best of both worlds, for those
who are very sure of themselves and want fast service can go ahead and use
rm, while those who want to be protected from themselves can use del. 
I prefer rm, but sometimes when I am not sure what files my pattern will
match, it's convenient to use 'del' just to be on the safe side.
(For those familiar with VMS, note that this is exactly what DELETE/CONFIRM
does)

			GREG (ucbvax!menlo70!hao!woods)



More information about the Comp.unix.wizards mailing list