Re: rm(1) bug, possibly serious
- From: Jan Grant <jan.grant@xxxxxxxxxxxxx>
- Date: Tue, 25 Sep 2007 17:55:18 +0100 (BST)
On Tue, 25 Sep 2007, Oliver Fromme wrote:
Note that the command "rm -rf ../" was entered twice.
The first time I got an error message (and exit code 1),
the second time it apparently succeeded.
Check the man page for rm:
-f Attempt to remove the files without prompting for confirma-
tion, regardless of the file's permissions. If the file does
not exist, do not display a diagnostic message or modify the
exit status to reflect an error.
That's what's happening the second time through. The first time, your
current directory is getting removed (so ../ won't refer to a real
directory the second time around). The bug is really in rm(1)'s initial
diagnostic message.
--
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661 http://ioctl.org/jan/
We thought time travel was impossible. But that was now and this is then.
_______________________________________________
freebsd-stable@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- Re: rm(1) bug, possibly serious
- From: CmdLnKid
- Re: rm(1) bug, possibly serious
- References:
- rm(1) bug, possibly serious
- From: Oliver Fromme
- rm(1) bug, possibly serious
- Prev by Date: cvs questions
- Next by Date: Re: device polling and weird timer interrupt count from vmstat
- Previous by thread: Re: rm(1) bug, possibly serious
- Next by thread: Re: rm(1) bug, possibly serious
- Index(es):
Relevant Pages
|