Bug (feature?) in rm -r.
Reg Hody
hody at dalcs.UUCP
Wed Mar 27 04:39:58 AEST 1985
A user on our system sent in the following report:
Reg, I found an interesting bug in Unix (is that ever interesting?): If "x"
is a subdirectory of "y", then "rm -r y/x" bombs after removing the
contents of "x", saying that y/x doesn't exist (whereas it should be
deleted). "rmdir y/x" works if "x" is empty". "rm y/x" at least admits that
"y/x" exists. If x is a plain file then "rm -r y/x" works as it should.
Also "chdir y; rm -r x" works fine. Odd, eh? I assume you can pass this on
to "the apprpriate authorities".
--
reg
Reg Hody, Dalhousie University, Halifax, Nova Scotia. B3H 4H8 (902-424-6501)
hody%dalcs at dartmouth or {allegra,decvax,ihnp4}!utcsri!dalcs!hody
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list