<?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: Compress Each Folder/Directory to Separate Archives in Linux</title>
	<atom:link href="http://r3dux.org/2009/06/how-to-compress-each-folderdirectory-to-separate-archives-in-linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://r3dux.org/2009/06/how-to-compress-each-folderdirectory-to-separate-archives-in-linux/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-compress-each-folderdirectory-to-separate-archives-in-linux</link>
	<description>A number-pimping side project from the valleys in *NEW* upside-down flavour.</description>
	<lastBuildDate>Fri, 10 Feb 2012 13:11:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: r3dux</title>
		<link>http://r3dux.org/2009/06/how-to-compress-each-folderdirectory-to-separate-archives-in-linux/#comment-6412</link>
		<dc:creator>r3dux</dc:creator>
		<pubDate>Wed, 19 Jan 2011 21:26:51 +0000</pubDate>
		<guid isPermaLink="false">http://r3dux.org/?p=719#comment-6412</guid>
		<description>Well, yours seems pretty comprehensive with the date and all that - good job, and thanks for sharing.

Bash scripting is such fiddly stuff :)</description>
		<content:encoded><![CDATA[<p>Well, yours seems pretty comprehensive with the date and all that &#8211; good job, and thanks for sharing.</p>
<p>Bash scripting is such fiddly stuff <img src='http://r3dux.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://r3dux.org/2009/06/how-to-compress-each-folderdirectory-to-separate-archives-in-linux/#comment-6411</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Wed, 19 Jan 2011 21:04:11 +0000</pubDate>
		<guid isPermaLink="false">http://r3dux.org/?p=719#comment-6411</guid>
		<description>Thanks that seems so much simpler than what i came up with.

&lt;pre lang=&quot;bash&quot;&gt;for folder in $(find /backup/live/ -maxdepth 1 -mindepth 1 -name &#039;[!.]*&#039; -exec basename  {} \;)
do
7z a -mmt /backup/archive/${folder}/${folder}-backup-$(date +%d-%m-%Y).7z /backup/live/${folder} &gt;&gt; /tmp/backup-7z
done&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Thanks that seems so much simpler than what i came up with.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">for</span> folder <span style="color: #000000; font-weight: bold;">in</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span>backup<span style="color: #000000; font-weight: bold;">/</span>live<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-maxdepth</span> <span style="color: #000000;">1</span> <span style="color: #660033;">-mindepth</span> <span style="color: #000000;">1</span> <span style="color: #660033;">-name</span> <span style="color: #ff0000;">'[!.]*'</span> <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">basename</span>  <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">do</span>
7z a <span style="color: #660033;">-mmt</span> <span style="color: #000000; font-weight: bold;">/</span>backup<span style="color: #000000; font-weight: bold;">/</span>archive<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${folder}</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${folder}</span>-backup-$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>d-<span style="color: #000000; font-weight: bold;">%</span>m-<span style="color: #000000; font-weight: bold;">%</span>Y<span style="color: #7a0874; font-weight: bold;">&#41;</span>.7z <span style="color: #000000; font-weight: bold;">/</span>backup<span style="color: #000000; font-weight: bold;">/</span>live<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${folder}</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>backup-7z
<span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: r3dux</title>
		<link>http://r3dux.org/2009/06/how-to-compress-each-folderdirectory-to-separate-archives-in-linux/#comment-6409</link>
		<dc:creator>r3dux</dc:creator>
		<pubDate>Wed, 19 Jan 2011 04:41:30 +0000</pubDate>
		<guid isPermaLink="false">http://r3dux.org/?p=719#comment-6409</guid>
		<description>try:

&lt;pre lang=&quot;bash&quot;&gt;
#!/bin/bash
for folder in */
do
  7z a -mx9 -mmt &quot;/backup/archive/${folder%/}.7z&quot; &quot;$folder&quot;
done&lt;/pre&gt;

=D</description>
		<content:encoded><![CDATA[<p>try:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #000000; font-weight: bold;">for</span> folder <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">*/</span>
<span style="color: #000000; font-weight: bold;">do</span>
  7z a <span style="color: #660033;">-mx9</span> <span style="color: #660033;">-mmt</span> <span style="color: #ff0000;">&quot;/backup/archive/<span style="color: #007800;">${folder%/}</span>.7z&quot;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$folder</span>&quot;</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<p>=D</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://r3dux.org/2009/06/how-to-compress-each-folderdirectory-to-separate-archives-in-linux/#comment-6408</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Tue, 18 Jan 2011 23:34:21 +0000</pubDate>
		<guid isPermaLink="false">http://r3dux.org/?p=719#comment-6408</guid>
		<description>Great example and very simple. However I have one question. Im trying to create the folder archives in a different folder e.g.

All folders in 
/backup/live/*

are archived and sent to:

/backup/archive

im sure this would be quite simple but im not sure how to do this.

Thanks :-D</description>
		<content:encoded><![CDATA[<p>Great example and very simple. However I have one question. Im trying to create the folder archives in a different folder e.g.</p>
<p>All folders in<br />
/backup/live/*</p>
<p>are archived and sent to:</p>
<p>/backup/archive</p>
<p>im sure this would be quite simple but im not sure how to do this.</p>
<p>Thanks <img src='http://r3dux.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

