<?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: Linux / UNIX: tar Command Stay In Local / File System When Creating Archive</title> <atom:link href="http://www.cyberciti.biz/faq/restricting-tar-tosingle-root-file-system-skip-other-system/feed/" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/faq/restricting-tar-tosingle-root-file-system-skip-other-system/</link> <description>Every answer asks a more beautiful question.</description> <lastBuildDate>Fri, 10 Feb 2012 19:55:56 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: Peg Perego Uno Stroller</title><link>http://www.cyberciti.biz/faq/restricting-tar-tosingle-root-file-system-skip-other-system/#comment-45014</link> <dc:creator>Peg Perego Uno Stroller</dc:creator> <pubDate>Fri, 04 Dec 2009 06:57:00 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=5845#comment-45014</guid> <description>great post as usual .. thanks  .. you just gave me a few more ideas to play with</description> <content:encoded><![CDATA[<p>great post as usual .. thanks  .. you just gave me a few more ideas to play with</p> ]]></content:encoded> </item> <item><title>By: LightningCrash</title><link>http://www.cyberciti.biz/faq/restricting-tar-tosingle-root-file-system-skip-other-system/#comment-44891</link> <dc:creator>LightningCrash</dc:creator> <pubDate>Wed, 25 Nov 2009 17:52:41 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=5845#comment-44891</guid> <description>I seem to recall if you explicitly call a directory, tar will ignore your one-file-system argument for that case.
Ie if you execute
&lt;code&gt;tar cvzf /path/to/file.tar.gz  --one-file-system /*&lt;/code&gt;
You&#039;ll end up with /sys and /proc et al, because you globbed them in!
Definitely test it before you send it after 1TB of data...</description> <content:encoded><![CDATA[<p>I seem to recall if you explicitly call a directory, tar will ignore your one-file-system argument for that case.</p><p>Ie if you execute<br
/> <code>tar cvzf /path/to/file.tar.gz  --one-file-system /*</code><br
/> You&#8217;ll end up with /sys and /proc et al, because you globbed them in!</p><p>Definitely test it before you send it after 1TB of data&#8230;</p> ]]></content:encoded> </item> <item><title>By: Vladimir</title><link>http://www.cyberciti.biz/faq/restricting-tar-tosingle-root-file-system-skip-other-system/#comment-44859</link> <dc:creator>Vladimir</dc:creator> <pubDate>Tue, 24 Nov 2009 09:57:36 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=5845#comment-44859</guid> <description>Just a little addition - use tar&#039;s -C
tar cvf /dev/st0 -C /*</description> <content:encoded><![CDATA[<p>Just a little addition &#8211; use tar&#8217;s -C</p><p>tar cvf /dev/st0 -C /*</p> ]]></content:encoded> </item> <item><title>By: King</title><link>http://www.cyberciti.biz/faq/restricting-tar-tosingle-root-file-system-skip-other-system/#comment-44847</link> <dc:creator>King</dc:creator> <pubDate>Mon, 23 Nov 2009 17:09:13 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=5845#comment-44847</guid> <description>Old habit for me is rather than using absolute pathname for root, you cd there and use the relative pathname &quot;.&quot; instead. Old versions of tar would restore the file exactly as it was created in the archive, so if you did this:
tar cvf /dev/st0  /
it created a tar file that could only be restored in /. Whereas if you do this:
cd /
tar cvf /dev/st0  .
you get a tar file that can be restored anywhere (including root as long as you cd there first).
Yes, many versions of tar have fixed this and Linux strips leading /s by default, but unless you&#039;re sure and there&#039;s no chance you may ever take your tar file to another machine (say an old Unix box), this is an easy way to be sure.</description> <content:encoded><![CDATA[<p>Old habit for me is rather than using absolute pathname for root, you cd there and use the relative pathname &#8220;.&#8221; instead. Old versions of tar would restore the file exactly as it was created in the archive, so if you did this:</p><p>tar cvf /dev/st0  /</p><p>it created a tar file that could only be restored in /. Whereas if you do this:</p><p>cd /<br
/> tar cvf /dev/st0  .</p><p>you get a tar file that can be restored anywhere (including root as long as you cd there first).</p><p>Yes, many versions of tar have fixed this and Linux strips leading /s by default, but unless you&#8217;re sure and there&#8217;s no chance you may ever take your tar file to another machine (say an old Unix box), this is an easy way to be sure.</p> ]]></content:encoded> </item> <item><title>By: Travis</title><link>http://www.cyberciti.biz/faq/restricting-tar-tosingle-root-file-system-skip-other-system/#comment-44841</link> <dc:creator>Travis</dc:creator> <pubDate>Mon, 23 Nov 2009 15:00:14 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=5845#comment-44841</guid> <description>It seems whenever I think of a problem you immediately post the solution.
Thank&#039;s Vivek!</description> <content:encoded><![CDATA[<p>It seems whenever I think of a problem you immediately post the solution.</p><p>Thank&#8217;s Vivek!</p> ]]></content:encoded> </item> </channel> </rss>
