[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rm hack



> So "-o 0" is certainly interesting, regardless of whether or not "-o -1"
> is parsed as two options or an option and an argument.  Certainly:
> $ rm -o ' -1' -P ...
> would get you (owrite == -1) 
> 
>> > 	for (z = 0; z < y; z++)
> 
> Blam.  At this point, you're waiting a while.

Upon actual testing, this appears to not be the case. I've tried it with 
several negative values, and in each case, it seems to behave the same as 
"-o 0" does -- that is to say, it doesn't bother going through the overwrite 
loop at all. The best you get is the one final overwrite that I left outside 
the loop, since it appeared to perform a different function than the 
repetitive overwrites. In any case, neither 0 nor negative numbers crashes 
it, and I say that if you're foolish enough as a user to put that in, you 
can live with getting one overwrite and then deletion. 

That was a good point, though, and I appreciate you bringing it to my 
attention. 

Alex Kirk