<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Tar on BAFM</title><link>https://christian.blog.pakiheim.de/tags/tar/</link><description>Recent content in Tar on BAFM</description><generator>Hugo -- 0.160.1</generator><language>en</language><lastBuildDate>Fri, 24 Jul 2009 13:40:18 +0000</lastBuildDate><atom:link href="https://christian.blog.pakiheim.de/tags/tar/index.xml" rel="self" type="application/rss+xml"/><item><title>Exclude a directory from tar</title><link>https://christian.blog.pakiheim.de/posts/2009-07-24_exclude-a-directory-from-tar/</link><pubDate>Fri, 24 Jul 2009 13:40:18 +0000</pubDate><guid isPermaLink="false">http://blog.barfoo.org/?p=2425</guid><description>&lt;p&gt;Damn tar is kinda weird .. usually, you specifiy excludes in the manner of &amp;ndash;exclude=&amp;quot;/path/to/exclude&amp;quot;. But tar needs to do things differently.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt" id="hl-0-1"&gt;&lt;a class="lnlinks" href="#hl-0-1"&gt;1&lt;/a&gt;
&lt;/span&gt;&lt;span class="lnt" id="hl-0-2"&gt;&lt;a class="lnlinks" href="#hl-0-2"&gt;2&lt;/a&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tar -cvpf /xen-dom0.tar --exclude &amp;#34;/proc/*&amp;#34; --exclude &amp;#34;/sys/*&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; --exclude &amp;#34;/dev/*&amp;#34; --exclude &amp;#34;/xen-dom0.tar&amp;#34; /
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;</description></item></channel></rss>