<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: How-to find broken symlinks</title>
	<link>http://www.zulustips.com/2007/01/26/how-to-find-broken-symlinks.html</link>
	<description>Notes about *nix, hardware &#038; software, performance &#038; optimization</description>
	<pubDate>Fri, 21 Nov 2008 04:09:14 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1</generator>

	<item>
		<title>By: Michael</title>
		<link>http://www.zulustips.com/2007/01/26/how-to-find-broken-symlinks.html#comment-11</link>
		<author>Michael</author>
		<pubDate>Thu, 01 Feb 2007 09:04:12 +0000</pubDate>
		<guid>http://www.zulustips.com/2007/01/26/how-to-find-broken-symlinks.html#comment-11</guid>
					<description>Probably you should use --exec or pipe to xargs to improve speed and not to break for in case of many many linknames.</description>
		<content:encoded><![CDATA[<p>Probably you should use &#8211;exec or pipe to xargs to improve speed and not to break for in case of many many linknames.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Darwin Award Winner</title>
		<link>http://www.zulustips.com/2007/01/26/how-to-find-broken-symlinks.html#comment-2168</link>
		<author>Darwin Award Winner</author>
		<pubDate>Sun, 14 Oct 2007 02:44:10 +0000</pubDate>
		<guid>http://www.zulustips.com/2007/01/26/how-to-find-broken-symlinks.html#comment-2168</guid>
					<description>find ~/ -xdev -type l -print0 &#124; xargs -0 -I '{}' sh -c "[ -e '{}' ] &#124;&#124; echo '{}' is broken"</description>
		<content:encoded><![CDATA[<p>find ~/ -xdev -type l -print0 | xargs -0 -I &#8216;{}&#8217; sh -c &#8220;[ -e &#8216;{}&#8217; ] || echo &#8216;{}&#8217; is broken&#8221;</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Darwin Award Winner</title>
		<link>http://www.zulustips.com/2007/01/26/how-to-find-broken-symlinks.html#comment-2169</link>
		<author>Darwin Award Winner</author>
		<pubDate>Sun, 14 Oct 2007 05:26:23 +0000</pubDate>
		<guid>http://www.zulustips.com/2007/01/26/how-to-find-broken-symlinks.html#comment-2169</guid>
					<description>Actually, that will fail on any file the contains a single quote in its name. So if you're not too attached to your single quotes, you can use this:

# obliterate single-quotes from file names
find $SOME_DIRECTORY -iname "*'*" -print0 &#124; xargs -0 rename tr/\'//d
# Function to find and remove bad links from files that don't have single quotes in their names
find $SOME_DIRECTORY -type l -print0 &#124; xargs -0 -I '{}' sh -c "[ -e '{}' ] &#124;&#124; rm -f '{}'"</description>
		<content:encoded><![CDATA[<p>Actually, that will fail on any file the contains a single quote in its name. So if you&#8217;re not too attached to your single quotes, you can use this:</p>
<p># obliterate single-quotes from file names<br />
find $SOME_DIRECTORY -iname &#8220;*&#8217;*&#8221; -print0 | xargs -0 rename tr/\&#8217;//d<br />
# Function to find and remove bad links from files that don&#8217;t have single quotes in their names<br />
find $SOME_DIRECTORY -type l -print0 | xargs -0 -I &#8216;{}&#8217; sh -c &#8220;[ -e &#8216;{}&#8217; ] || rm -f &#8216;{}&#8217;&#8221;</p>
]]></content:encoded>
				</item>
</channel>
</rss>
