<?xml version='1.0' encoding='utf-8' ?>

<rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/' xmlns:atom10='http://www.w3.org/2005/Atom'>
<channel>
  <title>The Disparate Musings of Pixie</title>
  <link>https://pinterface.dreamwidth.org/</link>
  <description>The Disparate Musings of Pixie - Dreamwidth Studios</description>
  <lastBuildDate>Mon, 22 Apr 2013 04:09:30 GMT</lastBuildDate>
  <generator>LiveJournal / Dreamwidth Studios</generator>
  <lj:journal>pinterface</lj:journal>
  <lj:journaltype>personal</lj:journaltype>
<item>
  <guid isPermaLink='true'>https://pinterface.dreamwidth.org/783.html</guid>
  <pubDate>Mon, 22 Apr 2013 04:09:30 GMT</pubDate>
  <title>A Public Service Announcement About rm and tildes</title>
  <link>https://pinterface.dreamwidth.org/783.html</link>
  <description>&lt;p&gt;If you happen to be lax in upgrading software, you might have an older version of magit where if M-x magit-status is allowed to initialize a git repository where none was before, it has a tendency to create said repository in the directory &apos;$HOME/repo/~/repo&apos;[1].&lt;/p&gt;

&lt;p&gt;If this happens, and one wishes to remove that annoying and non-useful &apos;~&apos; directory, do not, I repeat, do not run the command:&lt;/p&gt;
&lt;blockquote&gt;rm -r ~&lt;/blockquote&gt;

&lt;p&gt;That is bad.  Remember shell expansion!  You need to quote the tilde:&lt;/p&gt;
&lt;blockquote&gt;rm -r &apos;~&apos;&lt;/blockquote&gt;

&lt;p&gt;But also note that even the latter should not be done within eshell, as it seems to be intent on expanding the tilde anyway.  Use a real shell.&lt;/p&gt;

&lt;p&gt;Also, &lt;em&gt;always&lt;/em&gt; do &lt;tt&gt;`ls $dir`&lt;/tt&gt; before you do &lt;tt&gt;`rm $dir`&lt;/tt&gt;, just to double-check what you&apos;re deleting.  Even if you&apos;re sure, check anyway.&lt;/p&gt;

&lt;p&gt;Because otherwise, you might accidentally delete your home directory.&lt;/p&gt;

&lt;p style=&quot;margin-top: 4em;&quot;&gt;On the bright side, I can now confirm my backups work.&lt;/p&gt;

&lt;p&gt;[1] see &lt;a href=&quot;https://github.com/magit/magit/issues/383&quot;&gt;bug 383&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=pinterface&amp;ditemid=783&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://pinterface.dreamwidth.org/783.html</comments>
  <category>rm</category>
  <category>emacs</category>
  <category>backups</category>
  <category>linux</category>
  <category>oops</category>
  <category>public service announcement</category>
  <lj:mood>embarrassed</lj:mood>
  <lj:security>public</lj:security>
  <lj:reply-count>0</lj:reply-count>
</item>
</channel>
</rss>
