<?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: Recursively deleting symbolic link and what it points to</title>
	<atom:link href="http://www.alexonlinux.com/recursively-deleting-symbolic-link-and-what-it-points-to/feed" rel="self" type="application/rss+xml" />
	<link>http://www.alexonlinux.com/recursively-deleting-symbolic-link-and-what-it-points-to</link>
	<description></description>
	<lastBuildDate>Sun, 05 Feb 2012 21:17:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Alexander Sandler</title>
		<link>http://www.alexonlinux.com/recursively-deleting-symbolic-link-and-what-it-points-to/comment-page-1#comment-28439</link>
		<dc:creator>Alexander Sandler</dc:creator>
		<pubDate>Sun, 05 Feb 2012 21:13:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexonlinux.com/?p=1703#comment-28439</guid>
		<description>Wow. I am speechless.&lt;div class=&quot;comment-remix-meta&quot;&gt;&lt;a href=&quot;#&quot; class=&quot;replyto&quot; onclick=&quot;replyto(&#039;28439&#039;,&#039;Alexander Sandler&#039;); return false;&quot;&gt;Reply&lt;/a&gt;  - &lt;a href=&quot;#&quot; class=&quot;quote&quot; onclick=&quot;quote(&#039;28439&#039;,&#039;Alexander Sandler&#039;,&#039;Wow. I am speechless.&#039;); return false;&quot;&gt;Quote&lt;/a&gt;&lt;/div&gt;</description>
		<content:encoded><![CDATA[<p>Wow. I am speechless.
<div class="comment-remix-meta"><a href="#" class="replyto" onclick="replyto('28439','Alexander Sandler'); return false;">Reply</a>  &#8211; <a href="#" class="quote" onclick="quote('28439','Alexander Sandler','Wow. I am speechless.'); return false;">Quote</a></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ralph Corderoy</title>
		<link>http://www.alexonlinux.com/recursively-deleting-symbolic-link-and-what-it-points-to/comment-page-1#comment-27849</link>
		<dc:creator>Ralph Corderoy</dc:creator>
		<pubDate>Sun, 04 Dec 2011 11:11:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.alexonlinux.com/?p=1703#comment-27849</guid>
		<description></description>
		<content:encoded><![CDATA[<p>An interesting problem.â€‚Assuming I wasnâ€™t writing a C program to start with Iâ€™d have initially tackled it at the shell.</p>
<p>    seq 10 98 | while read f; do ln -s $((f+1)) $f; done; &gt;99<br />
    f=10; while [[ -L $f || -e $f ]]; do n=$(readlink &#8220;$f&#8221;); rm &#8220;$f&#8221;; f=&#8221;$n&#8221;; done</p>
<p>Originally I had â€œwhile [[ $f ]]&#8221; but this causes rm to attempt to remove a non-existent file if a symlink is broken.â€‚Adding -e alone doesnâ€™t work because [[ -e 10 ]] is false as bash gives up after following a few of the symlinks so we need to continue whilst itâ€™s either a symlink or it really does exist.
<div class="comment-remix-meta"><a href="#" class="replyto" onclick="replyto('27849','Ralph Corderoy'); return false;">Reply</a>  &#8211; <a href="#" class="quote" onclick="quote('27849','Ralph Corderoy','An interesting problem.&acirc;€‚Assuming I wasn&acirc;€™t writing a C program to start with I&acirc;€™d have initially tackled it at the shell.\r\n\r\n    seq 10 98 | while read f; do ln -s $((f+1)) $f; done; &amp;gt;99\r\n    f=10; while &amp;#91;&amp;#91; -L $f || -e $f &amp;#93;&amp;#93;; do n=$(readlink \&quot;$f\&quot;); rm \&quot;$f\&quot;; f=\&quot;$n\&quot;; done\r\n\r\nOriginally I had &acirc;€œwhile &amp;#91;&amp;#91; $f &amp;#93;&amp;#93;\&quot; but this causes rm to attempt to remove a non-existent file if a symlink is broken.&acirc;€‚Adding -e alone doesn&acirc;€™t work because &amp;#91;&amp;#91; -e 10 &amp;#93;&amp;#93; is false as bash gives up after following a few of the symlinks so we need to continue whilst it&acirc;€™s either a symlink or it really does exist.'); return false;">Quote</a></div>
]]></content:encoded>
	</item>
</channel>
</rss>

