<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: CLI challence: handle weird filenames without the use of copy-paste</title>
	<atom:link href="http://metelliuscode.wordpress.com/2008/11/18/cli-challence-handle-weird-filenames-without-the-use-of-copy-paste/feed/" rel="self" type="application/rss+xml" />
	<link>http://metelliuscode.wordpress.com/2008/11/18/cli-challence-handle-weird-filenames-without-the-use-of-copy-paste/</link>
	<description>Cries of help from yet another KDE coder (metellius@freenode)</description>
	<lastBuildDate>Sun, 18 Oct 2009 11:04:41 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: hlovdal</title>
		<link>http://metelliuscode.wordpress.com/2008/11/18/cli-challence-handle-weird-filenames-without-the-use-of-copy-paste/#comment-264</link>
		<dc:creator>hlovdal</dc:creator>
		<pubDate>Sun, 23 Nov 2008 21:32:38 +0000</pubDate>
		<guid isPermaLink="false">http://metelliuscode.wordpress.com/?p=61#comment-264</guid>
		<description>For xargs you most certainly want to use 0-terminated strings:

find . -inum 12345 -print0 &#124; xargs -0 rm

File names in these cases might accidentally contain a newline.</description>
		<content:encoded><![CDATA[<p>For xargs you most certainly want to use 0-terminated strings:</p>
<p>find . -inum 12345 -print0 | xargs -0 rm</p>
<p>File names in these cases might accidentally contain a newline.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luke Plant</title>
		<link>http://metelliuscode.wordpress.com/2008/11/18/cli-challence-handle-weird-filenames-without-the-use-of-copy-paste/#comment-263</link>
		<dc:creator>Luke Plant</dc:creator>
		<pubDate>Tue, 18 Nov 2008 17:10:32 +0000</pubDate>
		<guid isPermaLink="false">http://metelliuscode.wordpress.com/?p=61#comment-263</guid>
		<description>@metellius: a pleasure :-)

I also find this in .inputrc to be a invaluable:

&quot;\e[A&quot;: history-search-backward
&quot;\e[B&quot;: history-search-forward

It makes up and down keys do history searches e.g. type &quot;sudo &quot; then [up] and it will search through everything in history that starts with &quot;sudo &quot; -- a lot more useful than the default &#039;up key&#039; behaviour.</description>
		<content:encoded><![CDATA[<p>@metellius: a pleasure <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>I also find this in .inputrc to be a invaluable:</p>
<p>&#8220;\e[A": history-search-backward<br />
"\e[B": history-search-forward</p>
<p>It makes up and down keys do history searches e.g. type "sudo " then [up] and it will search through everything in history that starts with &#8220;sudo &#8221; &#8212; a lot more useful than the default &#8216;up key&#8217; behaviour.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lendulado</title>
		<link>http://metelliuscode.wordpress.com/2008/11/18/cli-challence-handle-weird-filenames-without-the-use-of-copy-paste/#comment-262</link>
		<dc:creator>lendulado</dc:creator>
		<pubDate>Tue, 18 Nov 2008 13:04:25 +0000</pubDate>
		<guid isPermaLink="false">http://metelliuscode.wordpress.com/?p=61#comment-262</guid>
		<description>You can also try detox: http://detox.sourceforge.net/</description>
		<content:encoded><![CDATA[<p>You can also try detox: <a href="http://detox.sourceforge.net/" rel="nofollow">http://detox.sourceforge.net/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: metellius</title>
		<link>http://metelliuscode.wordpress.com/2008/11/18/cli-challence-handle-weird-filenames-without-the-use-of-copy-paste/#comment-261</link>
		<dc:creator>metellius</dc:creator>
		<pubDate>Tue, 18 Nov 2008 11:35:28 +0000</pubDate>
		<guid isPermaLink="false">http://metelliuscode.wordpress.com/?p=61#comment-261</guid>
		<description>@Luke!
WOW, I&#039;ve been googling for so long for a tip just like that, had given up looking for it.</description>
		<content:encoded><![CDATA[<p>@Luke!<br />
WOW, I&#8217;ve been googling for so long for a tip just like that, had given up looking for it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luke Plant</title>
		<link>http://metelliuscode.wordpress.com/2008/11/18/cli-challence-handle-weird-filenames-without-the-use-of-copy-paste/#comment-260</link>
		<dc:creator>Luke Plant</dc:creator>
		<pubDate>Tue, 18 Nov 2008 10:42:36 +0000</pubDate>
		<guid isPermaLink="false">http://metelliuscode.wordpress.com/?p=61#comment-260</guid>
		<description>In Bash, use &#039;menu-complete&#039; in combination with tab completion - stick this in your ~/.inputrc

Control-o: menu-complete

Now tab will still do normal completion as far as it can, control-o will cycle through remaining options.  This allows to get to the file you want without having to type funny chars.</description>
		<content:encoded><![CDATA[<p>In Bash, use &#8216;menu-complete&#8217; in combination with tab completion &#8211; stick this in your ~/.inputrc</p>
<p>Control-o: menu-complete</p>
<p>Now tab will still do normal completion as far as it can, control-o will cycle through remaining options.  This allows to get to the file you want without having to type funny chars.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl</title>
		<link>http://metelliuscode.wordpress.com/2008/11/18/cli-challence-handle-weird-filenames-without-the-use-of-copy-paste/#comment-259</link>
		<dc:creator>Karl</dc:creator>
		<pubDate>Tue, 18 Nov 2008 09:36:32 +0000</pubDate>
		<guid isPermaLink="false">http://metelliuscode.wordpress.com/?p=61#comment-259</guid>
		<description>I found this tip from http://www.shell-fu.org/lister.php?top , perhaps it&#039;ll work for you as well? :)

Karl

To delete a file who&#039;s file name is a pain to define (eg. ^H^H^H) find it&#039;s inode number with the command &quot;ls -il&quot;. Use the line below to find and delete the file.

find . -inum 12345 &#124; xargs rm</description>
		<content:encoded><![CDATA[<p>I found this tip from <a href="http://www.shell-fu.org/lister.php?top" rel="nofollow">http://www.shell-fu.org/lister.php?top</a> , perhaps it&#8217;ll work for you as well? <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Karl</p>
<p>To delete a file who&#8217;s file name is a pain to define (eg. ^H^H^H) find it&#8217;s inode number with the command &#8220;ls -il&#8221;. Use the line below to find and delete the file.</p>
<p>find . -inum 12345 | xargs rm</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anarky</title>
		<link>http://metelliuscode.wordpress.com/2008/11/18/cli-challence-handle-weird-filenames-without-the-use-of-copy-paste/#comment-258</link>
		<dc:creator>Anarky</dc:creator>
		<pubDate>Tue, 18 Nov 2008 09:13:50 +0000</pubDate>
		<guid isPermaLink="false">http://metelliuscode.wordpress.com/?p=61#comment-258</guid>
		<description>I tend to use &quot;*&quot; or &quot;?&quot; in most case and come up with a pattern that matches only one file name but uses only ascii characters.</description>
		<content:encoded><![CDATA[<p>I tend to use &#8220;*&#8221; or &#8220;?&#8221; in most case and come up with a pattern that matches only one file name but uses only ascii characters.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesús Guerrero</title>
		<link>http://metelliuscode.wordpress.com/2008/11/18/cli-challence-handle-weird-filenames-without-the-use-of-copy-paste/#comment-257</link>
		<dc:creator>Jesús Guerrero</dc:creator>
		<pubDate>Tue, 18 Nov 2008 08:25:21 +0000</pubDate>
		<guid isPermaLink="false">http://metelliuscode.wordpress.com/?p=61#comment-257</guid>
		<description>I am not sure if these will work with all the possible names. However, they seem to handle just fine the names in your tarball. Some possible solutions:

- Try another shell, autocompletion for zsh (or whas it ksh) works differently than the one in bash
- mc
- a simple oneliner that adds kind of an index in front of the file name, something like

j=1; for i in *; do echo mv &quot;$i&quot; &quot;$(printf %.2i $j)_$i&quot;; j=$((j+1)); done

Remove the &quot;echo&quot; if you like the way it works to do the real thing. You can alias it, and that way at least you don&#039;t have to depend on a file manager to rename your files and be able to reference them. This is the solution I usually use.</description>
		<content:encoded><![CDATA[<p>I am not sure if these will work with all the possible names. However, they seem to handle just fine the names in your tarball. Some possible solutions:</p>
<p>- Try another shell, autocompletion for zsh (or whas it ksh) works differently than the one in bash<br />
- mc<br />
- a simple oneliner that adds kind of an index in front of the file name, something like</p>
<p>j=1; for i in *; do echo mv &#8220;$i&#8221; &#8220;$(printf %.2i $j)_$i&#8221;; j=$((j+1)); done</p>
<p>Remove the &#8220;echo&#8221; if you like the way it works to do the real thing. You can alias it, and that way at least you don&#8217;t have to depend on a file manager to rename your files and be able to reference them. This is the solution I usually use.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Kofler</title>
		<link>http://metelliuscode.wordpress.com/2008/11/18/cli-challence-handle-weird-filenames-without-the-use-of-copy-paste/#comment-256</link>
		<dc:creator>Kevin Kofler</dc:creator>
		<pubDate>Tue, 18 Nov 2008 07:26:38 +0000</pubDate>
		<guid isPermaLink="false">http://metelliuscode.wordpress.com/?p=61#comment-256</guid>
		<description>Some of the mojibake can be fixed by convmv.</description>
		<content:encoded><![CDATA[<p>Some of the mojibake can be fixed by convmv.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
