<?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: How To Rename Multiple Files Together in Linux Using 3 Methods</title>
	<atom:link href="http://www.thegeekstuff.com/2009/06/how-to-rename-files-in-group/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thegeekstuff.com/2009/06/how-to-rename-files-in-group/</link>
	<description>Guides, HowTos and Tips for Technology Geeks</description>
	<lastBuildDate>Thu, 09 Feb 2012 11:52:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: richard</title>
		<link>http://www.thegeekstuff.com/2009/06/how-to-rename-files-in-group/comment-page-1/#comment-77679</link>
		<dc:creator>richard</dc:creator>
		<pubDate>Thu, 06 Jan 2011 19:57:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=509#comment-77679</guid>
		<description>In response to Nick, removing the s/ and all subsequent /&#039;s using a space separator with Fedora worked perfectly.

 rename .html .htm *.html</description>
		<content:encoded><![CDATA[<p>In response to Nick, removing the s/ and all subsequent /&#8217;s using a space separator with Fedora worked perfectly.</p>
<p> rename .html .htm *.html</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nardi</title>
		<link>http://www.thegeekstuff.com/2009/06/how-to-rename-files-in-group/comment-page-1/#comment-77421</link>
		<dc:creator>nardi</dc:creator>
		<pubDate>Wed, 05 Jan 2011 09:07:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=509#comment-77421</guid>
		<description>to john.dennis@mailcatch.com: 
Hi John. From your complaints we can hardly figure out how to help. It might be just a little misunderstanding or nonstandard behavior. 
Could you please be more specific about what commands did you run and what output did you get? It would also be nice to know what shell are you using (type in &quot;echo $SHELL&quot;) just to make sure it unedrstands bash commands. 
Yeah and how is this done in DOS actually?</description>
		<content:encoded><![CDATA[<p>to <a href="mailto:john.dennis@mailcatch.com">john.dennis@mailcatch.com</a>:<br />
Hi John. From your complaints we can hardly figure out how to help. It might be just a little misunderstanding or nonstandard behavior.<br />
Could you please be more specific about what commands did you run and what output did you get? It would also be nice to know what shell are you using (type in &#8220;echo $SHELL&#8221;) just to make sure it unedrstands bash commands.<br />
Yeah and how is this done in DOS actually?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: john.dennis@mailcatch.com</title>
		<link>http://www.thegeekstuff.com/2009/06/how-to-rename-files-in-group/comment-page-1/#comment-77328</link>
		<dc:creator>john.dennis@mailcatch.com</dc:creator>
		<pubDate>Tue, 04 Jan 2011 20:09:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=509#comment-77328</guid>
		<description>None of these examples appear to work in xandros linux (eeepc) except midnight  commander which is so klunky I am frightened of using it.   
Why is it SO difficult to rename multiple files in linux when it is so easy in DOS ?&#039;
When i chose linux for my netbook I was swayed by the supposed easy availability of thousands of free programs.  Well I can&#039;t find a free program which will rename files - such a common requirement, and none of the command line solutions appear to work. (including chcase )  Does anyone know of one?   Is it Xandros that is the problem?  
There are dozens for Windoze....I did see in one forum where somebody actually suggested changing the file names manually one by one. Shome joke shurely?</description>
		<content:encoded><![CDATA[<p>None of these examples appear to work in xandros linux (eeepc) except midnight  commander which is so klunky I am frightened of using it.<br />
Why is it SO difficult to rename multiple files in linux when it is so easy in DOS ?&#8217;<br />
When i chose linux for my netbook I was swayed by the supposed easy availability of thousands of free programs.  Well I can&#8217;t find a free program which will rename files &#8211; such a common requirement, and none of the command line solutions appear to work. (including chcase )  Does anyone know of one?   Is it Xandros that is the problem?<br />
There are dozens for Windoze&#8230;.I did see in one forum where somebody actually suggested changing the file names manually one by one. Shome joke shurely?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Stoianov</title>
		<link>http://www.thegeekstuff.com/2009/06/how-to-rename-files-in-group/comment-page-1/#comment-24586</link>
		<dc:creator>Nick Stoianov</dc:creator>
		<pubDate>Wed, 02 Dec 2009 23:02:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=509#comment-24586</guid>
		<description>FYI: rename command in RedHat DOES NOT accept perl regular expressions. So.....the command:  rename s/.html/.htm/ *.html   WILL NOT work on RedHat. 

If you want to use regex on Redhat in renaming files - use: ren

Example: /usr/local/bin/ren &#039;s/ //g&#039; *.txt  

This example will remove all the white spaces from the text files in a directory.</description>
		<content:encoded><![CDATA[<p>FYI: rename command in RedHat DOES NOT accept perl regular expressions. So&#8230;..the command:  rename s/.html/.htm/ *.html   WILL NOT work on RedHat. </p>
<p>If you want to use regex on Redhat in renaming files &#8211; use: ren</p>
<p>Example: /usr/local/bin/ren &#8216;s/ //g&#8217; *.txt  </p>
<p>This example will remove all the white spaces from the text files in a directory.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramesh Natarajan</title>
		<link>http://www.thegeekstuff.com/2009/06/how-to-rename-files-in-group/comment-page-1/#comment-11495</link>
		<dc:creator>Ramesh Natarajan</dc:creator>
		<pubDate>Mon, 15 Jun 2009 05:33:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=509#comment-11495</guid>
		<description>&lt;strong&gt;@Binny,&lt;/strong&gt;

Thanks for the information about KRename, which definitely a very useful tool.
&lt;Code&gt;&#160;&lt;/code&gt;

For those who have not used KRename, check-out some &lt;a href=&quot;http://www.krename.net/Screenshots.11.0.html&quot; rel=&quot;nofollow&quot;&gt;screenshots of Krename&lt;/a&gt;
&lt;Code&gt;&#160;&lt;/code&gt;

&lt;strong&gt;@Iftikhar,&lt;/strong&gt;

Thanks for the info. mmv looks similar to rename. Is there anything special that mmv does which rename cannot do? (or) Is it pretty much the same?

&lt;Code&gt;&#160;&lt;/code&gt;

&lt;strong&gt;@Nardi,&lt;/strong&gt;

Your for-loop is similar to the method-2. Thanks for showing your detailed examples on how you do the move.

&lt;Code&gt;&#160;&lt;/code&gt;

&lt;strong&gt;@Nabin,&lt;/strong&gt;

I&#039;m not sure whether there is a single command that will do the swap. I hope someone else can throw some ideas on your question. One thing that came to my mind is -- Instead of doing multiple mv&#039;s probably you can create a alias called mvswap which can have the multiple mv commands. 

&lt;Code&gt;&#160;&lt;/code&gt;
&lt;strong&gt;@Flynets,&lt;/strong&gt;

Replacing space in a filename with underscore or hypen in a common requirement. Thanks for sharing your great example to solve that problem.</description>
		<content:encoded><![CDATA[<p><strong>@Binny,</strong></p>
<p>Thanks for the information about KRename, which definitely a very useful tool.<br />
<code>&nbsp;</code></p>
<p>For those who have not used KRename, check-out some <a href="http://www.krename.net/Screenshots.11.0.html" rel="nofollow">screenshots of Krename</a><br />
<code>&nbsp;</code></p>
<p><strong>@Iftikhar,</strong></p>
<p>Thanks for the info. mmv looks similar to rename. Is there anything special that mmv does which rename cannot do? (or) Is it pretty much the same?</p>
<p><code>&nbsp;</code></p>
<p><strong>@Nardi,</strong></p>
<p>Your for-loop is similar to the method-2. Thanks for showing your detailed examples on how you do the move.</p>
<p><code>&nbsp;</code></p>
<p><strong>@Nabin,</strong></p>
<p>I'm not sure whether there is a single command that will do the swap. I hope someone else can throw some ideas on your question. One thing that came to my mind is -- Instead of doing multiple mv's probably you can create a alias called mvswap which can have the multiple mv commands. </p>
<p><code>&nbsp;</code><br />
<strong>@Flynets,</strong></p>
<p>Replacing space in a filename with underscore or hypen in a common requirement. Thanks for sharing your great example to solve that problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Flynets</title>
		<link>http://www.thegeekstuff.com/2009/06/how-to-rename-files-in-group/comment-page-1/#comment-11478</link>
		<dc:creator>Flynets</dc:creator>
		<pubDate>Sun, 14 Jun 2009 14:07:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=509#comment-11478</guid>
		<description>Replace space char with underscore from files
find . -type f -iname &quot;*.mp3&quot; -exec rename &quot;s/ /_/g&quot; {} \;</description>
		<content:encoded><![CDATA[<p>Replace space char with underscore from files<br />
find . -type f -iname &#8220;*.mp3&#8243; -exec rename &#8220;s/ /_/g&#8221; {} \;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nabin Limbu</title>
		<link>http://www.thegeekstuff.com/2009/06/how-to-rename-files-in-group/comment-page-1/#comment-11467</link>
		<dc:creator>Nabin Limbu</dc:creator>
		<pubDate>Sun, 14 Jun 2009 06:16:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=509#comment-11467</guid>
		<description>Hi, 

There are lots of time when we require to swap files between two configuration files. Is there any single command which will swap two files instead of writing 3 commands like this:  mv abc.txt  tmp.txt; mv def.txt abc.txt; mv tmp.txt def.txt</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>There are lots of time when we require to swap files between two configuration files. Is there any single command which will swap two files instead of writing 3 commands like this:  mv abc.txt  tmp.txt; mv def.txt abc.txt; mv tmp.txt def.txt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NARDI</title>
		<link>http://www.thegeekstuff.com/2009/06/how-to-rename-files-in-group/comment-page-1/#comment-11464</link>
		<dc:creator>NARDI</dc:creator>
		<pubDate>Sat, 13 Jun 2009 20:57:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=509#comment-11464</guid>
		<description>wow.. didn&#039;t know that rename is so powerfull.  I&#039;ll try to use it instead of my favourite
   for f in * ; do mv &quot;$f&quot; &quot;${f//foo/bar}&quot; ; done
I&#039;m not sure if it was mentioned here before but JFYI: 

f=foofoo.foo

#replace first
echo ${f/foo/bar} # -&gt; barfoo.foo

#replace all occurences
echo ${f//foo/bar} # -&gt; barbar.bar

#replace first match from the beginning
echo ${f#f*f} # -&gt; oo.foo
#notice the &#039;star&#039; consumes only &#039;oo&#039; here

#replace all (longest match of regexp) from the beginning
echo ${f##f*f} # -&gt; oo
#here, there is &#039;oofoo.&#039; hidden under the &#039;star&#039; in regex &#039;f*f&#039; 

#extension replacement
echo ${f%foo}bar # -&gt; foofoo.bar

#replace first from the end
echo ${f%oo*} # -&gt; foofoo.f

#replace all (longest match of regexp) from the end
echo ${f%%oo*} # -&gt; f

enjoy =)</description>
		<content:encoded><![CDATA[<p>wow.. didn&#8217;t know that rename is so powerfull.  I&#8217;ll try to use it instead of my favourite<br />
   for f in * ; do mv &#8220;$f&#8221; &#8220;${f//foo/bar}&#8221; ; done<br />
I&#8217;m not sure if it was mentioned here before but JFYI: </p>
<p>f=foofoo.foo</p>
<p>#replace first<br />
echo ${f/foo/bar} # -&gt; barfoo.foo</p>
<p>#replace all occurences<br />
echo ${f//foo/bar} # -&gt; barbar.bar</p>
<p>#replace first match from the beginning<br />
echo ${f#f*f} # -&gt; oo.foo<br />
#notice the &#8216;star&#8217; consumes only &#8216;oo&#8217; here</p>
<p>#replace all (longest match of regexp) from the beginning<br />
echo ${f##f*f} # -&gt; oo<br />
#here, there is &#8216;oofoo.&#8217; hidden under the &#8216;star&#8217; in regex &#8216;f*f&#8217; </p>
<p>#extension replacement<br />
echo ${f%foo}bar # -&gt; foofoo.bar</p>
<p>#replace first from the end<br />
echo ${f%oo*} # -&gt; foofoo.f</p>
<p>#replace all (longest match of regexp) from the end<br />
echo ${f%%oo*} # -&gt; f</p>
<p>enjoy =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: !ncognito</title>
		<link>http://www.thegeekstuff.com/2009/06/how-to-rename-files-in-group/comment-page-1/#comment-11458</link>
		<dc:creator>!ncognito</dc:creator>
		<pubDate>Sat, 13 Jun 2009 14:41:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=509#comment-11458</guid>
		<description>1st method seems dead simple.. Nice post!</description>
		<content:encoded><![CDATA[<p>1st method seems dead simple.. Nice post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Iftikhar Ul Hassan</title>
		<link>http://www.thegeekstuff.com/2009/06/how-to-rename-files-in-group/comment-page-1/#comment-11438</link>
		<dc:creator>Iftikhar Ul Hassan</dc:creator>
		<pubDate>Fri, 12 Jun 2009 18:59:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.thegeekstuff.com/?p=509#comment-11438</guid>
		<description>Hi, that&#039;s really nice, thanks for the great post. 

But have you tried using the &quot;mmv&quot; command (multiple move). This utility is not part of linux standard command set (I don&#039;t know why) but it&#039;s really nice.

So you just need to install the utility

hassan@linux:~$ sudo apt-get install mmv

Then you can move multiple files very easily, here is an example. 

==&gt;I want to rename all files which have extension *.htm to *.html&lt;==

hassan@linux:~$ mmv &quot;*.htm &quot;  &quot;#1.html&quot; 


You can read more about it from the excellent tutorial here (http://linux.dsplabs.com.au/mmv-copy-append-link-move-multiple-files-under-linux-shell-bash-by-wildcard-patterns-p5/)</description>
		<content:encoded><![CDATA[<p>Hi, that&#8217;s really nice, thanks for the great post. </p>
<p>But have you tried using the &#8220;mmv&#8221; command (multiple move). This utility is not part of linux standard command set (I don&#8217;t know why) but it&#8217;s really nice.</p>
<p>So you just need to install the utility</p>
<p>hassan@linux:~$ sudo apt-get install mmv</p>
<p>Then you can move multiple files very easily, here is an example. </p>
<p>==&gt;I want to rename all files which have extension *.htm to *.html&lt;==</p>
<p>hassan@linux:~$ mmv &#8220;*.htm &#8221;  &#8220;#1.html&#8221; </p>
<p>You can read more about it from the excellent tutorial here (<a href="http://linux.dsplabs.com.au/mmv-copy-append-link-move-multiple-files-under-linux-shell-bash-by-wildcard-patterns-p5/" rel="nofollow">http://linux.dsplabs.com.au/mmv-copy-append-link-move-multiple-files-under-linux-shell-bash-by-wildcard-patterns-p5/</a>)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Content Delivery Network via Amazon Web Services: CloudFront: static.thegeekstuff.com

Served from: www.thegeekstuff.com @ 2012-02-09 12:25:33 -->
