Date: Sat, 4 Nov 2006 18:10:41 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: Joerg Pernfuss <elessar@bsdforen.de> Cc: freebsd-hackers@freebsd.org Subject: Re: [patch] rm can have undesired side-effects Message-ID: <200611050210.kA52AfcE011403@apollo.backplane.com> References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <00f201c6fbb6$0c6bd150$b3db87d4@multiplay.co.uk> <20061030024358.39a12359@loki.starkstrom.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
:... :BSD behaviour: :- OpenBSD handles hardlinks since 3.3: : -P Overwrite regular files before deleting them. Files : are overwritten three times, first with the byte pattern : 0xff, then 0x00, and then 0xff again, before they are : deleted. Files with multiple links will not be overwritten. :- NetBSD uses 0xff, 0x00 and then random data. Ignores link count :- DragonFlyBSD has the same behaviour as FreeBSD : :... :Although I am a big defender of "the user should know what he does", :the "right thing to do"[TM] would probably be to sync the behaviour :of FreeBSD's rm(1) to OpenBSD and lobby NetBSD and DragonFlyBSD to do :the same :) : : Joerg I agree. I will make this change in DragonFly right now, in fact. The -P option really needs to be consistent across environments and my take on the original design was so users could alias rm to rm -P in their .cshrc files. Clearly it cannot destroy the contents of the file in the presence of hard links when used in that context. -Matt
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611050210.kA52AfcE011403>