<story><title>I&apos;m “still afraid to use spaces in file names” years old</title><url>https://twitter.com/TheIdOfAlan/status/1458117496087748618</url></story><parent_chain><item><author>tgbugs</author><text>Word of warning from hard experience: rn is a really dangerous thing to name a function because it is one char away from rm.</text></item><item><author>mtift</author><text>I have an overly-aggressive function in my .bashrc to rename all files in the current directory:&lt;p&gt;&lt;pre&gt;&lt;code&gt;  # Rename all files in a directory
  rn() {
    rename &amp;quot;s&amp;#x2F; &amp;#x2F;-&amp;#x2F;g&amp;quot; *
    rename &amp;quot;s&amp;#x2F;_&amp;#x2F;-&amp;#x2F;g&amp;quot; *
    rename &amp;quot;s&amp;#x2F;–&amp;#x2F;-&amp;#x2F;g&amp;quot; *
    rename &amp;quot;s&amp;#x2F;:&amp;#x2F;&amp;#x2F;g&amp;quot; *
    rename &amp;quot;s&amp;#x2F;\(&amp;#x2F;&amp;#x2F;g&amp;quot; *
    rename &amp;quot;s&amp;#x2F;\)&amp;#x2F;&amp;#x2F;g&amp;quot; *
    rename &amp;quot;s&amp;#x2F;\[&amp;#x2F;&amp;#x2F;g&amp;quot; *
    rename &amp;quot;s&amp;#x2F;\]&amp;#x2F;&amp;#x2F;g&amp;quot; *
    rename &amp;#x27;s&amp;#x2F;&amp;quot;&amp;#x2F;&amp;#x2F;g&amp;#x27; *
    rename &amp;quot;s&amp;#x2F;&amp;#x27;&amp;#x2F;&amp;#x2F;g&amp;quot; *
    rename &amp;quot;s&amp;#x2F;,&amp;#x2F;&amp;#x2F;g&amp;quot; *
    rename &amp;quot;y&amp;#x2F;A-Z&amp;#x2F;a-z&amp;#x2F;&amp;quot; *
    rename &amp;quot;s&amp;#x2F;---&amp;#x2F;--&amp;#x2F;g&amp;quot; *
    rename &amp;quot;s&amp;#x2F;-‎--&amp;#x2F;--&amp;#x2F;g&amp;quot; *
  }
&lt;/code&gt;&lt;/pre&gt;
I use this all the time, especially when I download files.</text></item></parent_chain><comment><author>spurgu</author><text>One char away also physically on the keyboard (maybe that&amp;#x27;s what you meant?).</text></comment>
<story><title>I&apos;m “still afraid to use spaces in file names” years old</title><url>https://twitter.com/TheIdOfAlan/status/1458117496087748618</url></story><parent_chain><item><author>tgbugs</author><text>Word of warning from hard experience: rn is a really dangerous thing to name a function because it is one char away from rm.</text></item><item><author>mtift</author><text>I have an overly-aggressive function in my .bashrc to rename all files in the current directory:&lt;p&gt;&lt;pre&gt;&lt;code&gt;  # Rename all files in a directory
  rn() {
    rename &amp;quot;s&amp;#x2F; &amp;#x2F;-&amp;#x2F;g&amp;quot; *
    rename &amp;quot;s&amp;#x2F;_&amp;#x2F;-&amp;#x2F;g&amp;quot; *
    rename &amp;quot;s&amp;#x2F;–&amp;#x2F;-&amp;#x2F;g&amp;quot; *
    rename &amp;quot;s&amp;#x2F;:&amp;#x2F;&amp;#x2F;g&amp;quot; *
    rename &amp;quot;s&amp;#x2F;\(&amp;#x2F;&amp;#x2F;g&amp;quot; *
    rename &amp;quot;s&amp;#x2F;\)&amp;#x2F;&amp;#x2F;g&amp;quot; *
    rename &amp;quot;s&amp;#x2F;\[&amp;#x2F;&amp;#x2F;g&amp;quot; *
    rename &amp;quot;s&amp;#x2F;\]&amp;#x2F;&amp;#x2F;g&amp;quot; *
    rename &amp;#x27;s&amp;#x2F;&amp;quot;&amp;#x2F;&amp;#x2F;g&amp;#x27; *
    rename &amp;quot;s&amp;#x2F;&amp;#x27;&amp;#x2F;&amp;#x2F;g&amp;quot; *
    rename &amp;quot;s&amp;#x2F;,&amp;#x2F;&amp;#x2F;g&amp;quot; *
    rename &amp;quot;y&amp;#x2F;A-Z&amp;#x2F;a-z&amp;#x2F;&amp;quot; *
    rename &amp;quot;s&amp;#x2F;---&amp;#x2F;--&amp;#x2F;g&amp;quot; *
    rename &amp;quot;s&amp;#x2F;-‎--&amp;#x2F;--&amp;#x2F;g&amp;quot; *
  }
&lt;/code&gt;&lt;/pre&gt;
I use this all the time, especially when I download files.</text></item></parent_chain><comment><author>post-it</author><text>Looks like it&amp;#x27;s typically run without any arguments, so it&amp;#x27;s probably fine.</text></comment>