<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Safer rm, more quickly	</title>
	<atom:link href="https://www.dragonflydigest.com/2004/10/06/safer-rm-more-quickly/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dragonflydigest.com/2004/10/06/safer-rm-more-quickly/</link>
	<description>A running description of activity related to DragonFly BSD.</description>
	<lastBuildDate>Tue, 09 Nov 2004 09:08:20 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>
		By: Juan		</title>
		<link>https://www.dragonflydigest.com/2004/10/06/safer-rm-more-quickly/comment-page-1/#comment-398</link>

		<dc:creator><![CDATA[Juan]]></dc:creator>
		<pubDate>Tue, 09 Nov 2004 09:08:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.shiningsilence.com/dbsdlog/?p=699#comment-398</guid>

					<description><![CDATA[In the Book BSD Hacks (O&#039;Reilly), Dru Lavigne explains a Hack for this making a Trash Directory and so solving this problem. I haven&#039;t tried but seems to be interesting.
]]></description>
			<content:encoded><![CDATA[<p>In the Book BSD Hacks (O&#8217;Reilly), Dru Lavigne explains a Hack for this making a Trash Directory and so solving this problem. I haven&#8217;t tried but seems to be interesting.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: bern1;		</title>
		<link>https://www.dragonflydigest.com/2004/10/06/safer-rm-more-quickly/comment-page-1/#comment-397</link>

		<dc:creator><![CDATA[bern1;]]></dc:creator>
		<pubDate>Thu, 07 Oct 2004 08:49:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.shiningsilence.com/dbsdlog/?p=699#comment-397</guid>

					<description><![CDATA[i did an rm accidently once:
i&#039;ve been working for a long time and increased my speed of working as i wanted to go home.
...and a few seconds later, my /usr/local/etc directory was history.

the interesting part is:
the command was of course not:
rm -rf /usr/local/etc
(the -f is implied anyway on freebsd)

it was rather something like only:
rm -r etc
and i didn&#039;t enter it myself, instead it was in my history after deleting a temporary etc directory somewhere else.

i quickly restored the directory from my last backup and didn&#039;t think about it anymore...


but reading through your postings made me think about it once again:
in my opinion, any solution that is based on a confirmation has a reasonable weekness:

if you manage to accidently rm -rf /something, you will also manage to confirm your accident 
and once you get used to a rm -r --f-even-more /something the whole mechanism is worth nothing.


my idea would be the following:

rm -rf /
&#062; this is always stupid

rm -rf something
&#062; operation not supported

rm -rf /absolute/path/to/something
&#062; this is ok.]]></description>
			<content:encoded><![CDATA[<p>i did an rm accidently once:<br />
i&#8217;ve been working for a long time and increased my speed of working as i wanted to go home.<br />
&#8230;and a few seconds later, my /usr/local/etc directory was history.</p>
<p>the interesting part is:<br />
the command was of course not:<br />
rm -rf /usr/local/etc<br />
(the -f is implied anyway on freebsd)</p>
<p>it was rather something like only:<br />
rm -r etc<br />
and i didn&#8217;t enter it myself, instead it was in my history after deleting a temporary etc directory somewhere else.</p>
<p>i quickly restored the directory from my last backup and didn&#8217;t think about it anymore&#8230;</p>
<p>but reading through your postings made me think about it once again:<br />
in my opinion, any solution that is based on a confirmation has a reasonable weekness:</p>
<p>if you manage to accidently rm -rf /something, you will also manage to confirm your accident<br />
and once you get used to a rm -r &#8211;f-even-more /something the whole mechanism is worth nothing.</p>
<p>my idea would be the following:</p>
<p>rm -rf /<br />
&gt; this is always stupid</p>
<p>rm -rf something<br />
&gt; operation not supported</p>
<p>rm -rf /absolute/path/to/something<br />
&gt; this is ok.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: andre		</title>
		<link>https://www.dragonflydigest.com/2004/10/06/safer-rm-more-quickly/comment-page-1/#comment-396</link>

		<dc:creator><![CDATA[andre]]></dc:creator>
		<pubDate>Thu, 07 Oct 2004 03:04:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.shiningsilence.com/dbsdlog/?p=699#comment-396</guid>

					<description><![CDATA[but then it would work only for rm... if i tried to remove a directory using, say, a ruby script, the srunlink flag would be ignored and the deletion would work.]]></description>
			<content:encoded><![CDATA[<p>but then it would work only for rm&#8230; if i tried to remove a directory using, say, a ruby script, the srunlink flag would be ignored and the deletion would work.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: mark		</title>
		<link>https://www.dragonflydigest.com/2004/10/06/safer-rm-more-quickly/comment-page-1/#comment-395</link>

		<dc:creator><![CDATA[mark]]></dc:creator>
		<pubDate>Thu, 07 Oct 2004 00:53:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.shiningsilence.com/dbsdlog/?p=699#comment-395</guid>

					<description><![CDATA[File flag(s) are checked when rm stats a file, which it does prior to deletion.  rm knows about the flag and about recursive deletion, so it can make the choice there- no kernel involvement required.]]></description>
			<content:encoded><![CDATA[<p>File flag(s) are checked when rm stats a file, which it does prior to deletion.  rm knows about the flag and about recursive deletion, so it can make the choice there- no kernel involvement required.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: andre		</title>
		<link>https://www.dragonflydigest.com/2004/10/06/safer-rm-more-quickly/comment-page-1/#comment-394</link>

		<dc:creator><![CDATA[andre]]></dc:creator>
		<pubDate>Wed, 06 Oct 2004 23:37:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.shiningsilence.com/dbsdlog/?p=699#comment-394</guid>

					<description><![CDATA[although i think this is a good idea, i believe it would not be easy to implement, since the kernel doesn&#039;t know when a recursive deletion is going on (you delete each file in a directory with unlink() and then rmdir() the empty directory).

but maybe i&#039;m completely wrong :)]]></description>
			<content:encoded><![CDATA[<p>although i think this is a good idea, i believe it would not be easy to implement, since the kernel doesn&#8217;t know when a recursive deletion is going on (you delete each file in a directory with unlink() and then rmdir() the empty directory).</p>
<p>but maybe i&#8217;m completely wrong :)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Mark Miller		</title>
		<link>https://www.dragonflydigest.com/2004/10/06/safer-rm-more-quickly/comment-page-1/#comment-393</link>

		<dc:creator><![CDATA[Mark Miller]]></dc:creator>
		<pubDate>Wed, 06 Oct 2004 19:11:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.shiningsilence.com/dbsdlog/?p=699#comment-393</guid>

					<description><![CDATA[The -I change seems like a good fix, but Matt missed one of the better developments that came out of that discussion: create a new file flag that forbids recursive deletion of a directory.

chflags srunlink /etc, for example, would stop any attempt to recursively remove /etc, and could be set/unset locally.  I&#039;d suggest that by default, the flag should be applied to /; smart admins can apply it to /etc, /usr/local/etc/, etc. as they see fit.]]></description>
			<content:encoded><![CDATA[<p>The -I change seems like a good fix, but Matt missed one of the better developments that came out of that discussion: create a new file flag that forbids recursive deletion of a directory.</p>
<p>chflags srunlink /etc, for example, would stop any attempt to recursively remove /etc, and could be set/unset locally.  I&#8217;d suggest that by default, the flag should be applied to /; smart admins can apply it to /etc, /usr/local/etc/, etc. as they see fit.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
