<?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: Quickly archive multiple directories into separate archive files</title>
	<atom:link href="http://www.64bitjungle.com/ubuntu/quickly-archive-multiple-directories-into-separate-archive-files/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.64bitjungle.com/ubuntu/quickly-archive-multiple-directories-into-separate-archive-files/</link>
	<description>Linux and Programming Tips and Tutorials, Technology and Rants from the Jungle</description>
	<lastBuildDate>Mon, 19 Jul 2010 07:47:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: jason</title>
		<link>http://www.64bitjungle.com/ubuntu/quickly-archive-multiple-directories-into-separate-archive-files/comment-page-1/#comment-15905</link>
		<dc:creator>jason</dc:creator>
		<pubDate>Mon, 14 Jun 2010 04:56:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.64bitjungle.com/?p=606#comment-15905</guid>
		<description>man, i googled for a script, ran across your code.

complete time saver man, props to you!

thanks so much.</description>
		<content:encoded><![CDATA[<p>man, i googled for a script, ran across your code.</p>
<p>complete time saver man, props to you!</p>
<p>thanks so much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: loomsen</title>
		<link>http://www.64bitjungle.com/ubuntu/quickly-archive-multiple-directories-into-separate-archive-files/comment-page-1/#comment-12585</link>
		<dc:creator>loomsen</dc:creator>
		<pubDate>Fri, 19 Mar 2010 01:59:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.64bitjungle.com/?p=606#comment-12585</guid>
		<description>Hi buddy.

By chance I&#039;ve had some similar needs lately. I wanted to create an archive of the deepest directory inside a structure with different depths (my music folder actually)
But first, you shouldn&#039;t parse ls output.
find $PWD -type d
would be much better. Also, there&#039;s no need to cd in a command or a script. 
However, here&#039;s what I did 
This nice piece of bit finds the deepest subdirs in a given stack, returning the full path for each one:

find $PWD -type d -exec bash -c &#039;shopt -s nullglob; d=(&quot;$1&quot;/*/); ((!${#d[@]}))&#039; _ {} \; -print &gt; /tmp/dirlist

and then run a nice smooth and safe

for i in $(sed &#039;1,$!d&#039; /tmp/dirlist); do tar cvfj &quot;${i##*/}&quot;.tar.bz2  &quot;$i&quot; ; done

:)

I just rolled a blog too, join me if you feel like :) 

blog.loomsen.org</description>
		<content:encoded><![CDATA[<p>Hi buddy.</p>
<p>By chance I&#8217;ve had some similar needs lately. I wanted to create an archive of the deepest directory inside a structure with different depths (my music folder actually)<br />
But first, you shouldn&#8217;t parse ls output.<br />
find $PWD -type d<br />
would be much better. Also, there&#8217;s no need to cd in a command or a script.<br />
However, here&#8217;s what I did<br />
This nice piece of bit finds the deepest subdirs in a given stack, returning the full path for each one:</p>
<p>find $PWD -type d -exec bash -c &#8217;shopt -s nullglob; d=(&#8220;$1&#8243;/*/); ((!${#d[@]}))&#8217; _ {} \; -print &gt; /tmp/dirlist</p>
<p>and then run a nice smooth and safe</p>
<p>for i in $(sed &#8216;1,$!d&#8217; /tmp/dirlist); do tar cvfj &#8220;${i##*/}&#8221;.tar.bz2  &#8220;$i&#8221; ; done</p>
<p> <img src='http://www.64bitjungle.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I just rolled a blog too, join me if you feel like <img src='http://www.64bitjungle.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>blog.loomsen.org</p>
]]></content:encoded>
	</item>
</channel>
</rss>
