Thank you!  I had a feeling I was missing something obvious.<br><br><div class="gmail_quote">On Tue, Nov 30, 2010 at 1:09 PM, Will <span dir="ltr">&lt;<a href="mailto:will.sterling@gmail.com">will.sterling@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Mike,<div><br></div><div>  It is filling your root partition because it is compressing the file three times and writing the compressed file to /tmp before deciding which one is smallest and coping the smallest file to the directory the original file was located in.</div>

<div><br></div><div>You can skip all of the headaches and just change the location of the scratch directory so that everything is written into /home</div><div><br></div><div><br></div><div>change the following: </div><div class="im">
<div>
<span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse;">Zout=&quot;/tmp/bestcompress.$$.Z&quot;<br>gzout=&quot;/tmp/bestcompress.$$.gz&quot;<br>bzout=&quot;/tmp/bestcompress.$$.bz&quot;</span><br>

<br></div></div><div>to:</div><div class="im"><div><span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse;">Zout=&quot;~/tmp/bestcompress.$$.Z&quot;<br>gzout=&quot;~/tmp/bestcompress.$$.gz&quot;<br>

bzout=&quot;~/tmp/bestcompress.$$.bz&quot;</span></div><div><span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse;"><br></span></div></div><div><span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse;">and make sure to create a directory named tmp in your home directory.</span></div>

<div><font face="arial, sans-serif"><span style="border-collapse: collapse;"><br></span></font><div class="gmail_quote"><div><div></div><div class="h5">On Tue, Nov 30, 2010 at 12:55 PM, Mike Bean <span dir="ltr">&lt;<a href="mailto:beandaemon@gmail.com" target="_blank">beandaemon@gmail.com</a>&gt;</span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div class="h5">The group told me once that I shouldn&#39;t ever have to reformat, made me think to ask first.<br>
<br>I&#39;m experimenting with some shell scripting and butting my head on 100% root too often.  Think the 10GB I allocated is just too low.  What I&#39;m not sure about is how to redo it without reinstalling.  Currently I&#39;m running 10G root, 250mb boot, 4GB swap. 485 GB home.  I&#39;ll have to shrink the home, but that will be fine.  I suspect...(blink), sorry, thinking about this as I go.  Clearly I have to shrink home, so I&#39;m backing it up now, but can I mount more then one device to the same mount point?  I wonder if maybe I could just mount more space to root.<br>


<br>Well, I guess, I&#39;m asking for advice on the most efficient manner to increase root.  Fundamentally, I don&#39;t particularly understand why my shell script is causing root to run out of space either. It&#39;s a 6G laptop and the files it compresses are sitting on the home partition.  To help illustrate, here&#39;s the contents.  <br>


<br>@fozzie:~/Dropbox/bin/scripts$ df -h<br>Filesystem            Size  Used Avail Use% Mounted on<br>/dev/sda1             9.2G  4.8G  4.0G  55% /<br>none                  2.9G  336K  2.9G   1% /dev<br>none                  2.9G  216K  2.9G   1% /dev/shm<br>


none                  2.9G  344K  2.9G   1% /var/run<br>/dev/sda4             446G  120G  303G  29% /home<br><br><br>!/bin/sh<br><br>Z=&quot;compress&quot;    gz=&quot;gzip&quot;    bz=&quot;bzip2&quot;<br>Zout=&quot;/tmp/bestcompress.$$.Z&quot;<br>


gzout=&quot;/tmp/bestcompress.$$.gz&quot;<br>bzout=&quot;/tmp/bestcompress.$$.bz&quot;<br>skipcompressed=1<br><br>if [ &quot;$1&quot; = &quot;-a&quot; ] ; then<br>    skipcompressed=0 ; shift<br>fi<br><br>if [ $# -eq 0 ]; then<br>


    echo &quot;Usage: $0 [-a] file or files to optimally compress&quot; &gt;&amp;2; exit 1<br>fi<br><br>trap &quot;/bin/rm -f $Zout $gzout $bzout&quot; EXIT<br><br>for name<br>do<br>    if [ ! -f &quot;$name&quot; ] ; then<br>


        echo &quot;$0: file $name not found. Skipped.&quot; &gt;&amp;2<br>        continue<br>    fi<br>    <br>    if [ &quot;$(echo $name | egrep &#39;(\.Z$|\.gz$|\.bz2$)&#39;)&quot; != &quot;&quot; ] ; then<br>        if [ $skipcompressed -eq 1 ] ; then<br>


            echo &quot;Skipped file ${name}: it&#39;s already compressed.&quot;<br>            continue<br>        else<br>            echo &quot;warning: trying to 2x compress $name&quot;<br>        fi<br>    fi<br>    <br>


    $Z &lt; &quot;$name&quot; &gt; $Zout    &amp;<br>    $gz &lt; &quot;$name&quot; &gt; $gzout    &amp;    <br>    $bz &lt; &quot;$name&quot; &gt; $bzout  &amp;<br><br>    wait # run compressions in paralell for speed. wait until all are done<br>


<br>    smallest=&quot;$(ls -l &quot;$name&quot; $Zout $gzout $bzout | \<br>       awk &#39;{print $5&quot;=&quot;NR}&#39; | sort -n | cut -d= -f2 | head -1)&quot;<br><br>    case &quot;$smallest&quot; in<br>        1) echo &quot;No space savings by compressing $name. Left as is.&quot;<br>


        ;;<br>        2) echo Best compression is with compress. File renamed ${name}.Z<br>        mv $Zout &quot;${name}.Z&quot; ; rm -f &quot;$name&quot;<br>        ;;<br>        3) echo Best compression is with gzip. File renamed ${name}.gz<br>


        mv $gzout &quot;${name}.gz&quot; ; rm -f &quot;$name&quot;<br>        ;;<br>        4) echo Best compression is with bzip2. File renamed ${name}.bz2<br>        mv $bzout &quot;${name}.bz2&quot; ; rm -f &quot;$name&quot;<br>


    esac<br><br>done<br>exit 0<br>
<br></div></div>_______________________________________________<br>
clue-tech mailing list<br>
<a href="mailto:clue-tech@cluedenver.org" target="_blank">clue-tech@cluedenver.org</a><br>
<a href="http://cluedenver.org/mailman/listinfo/clue-tech" target="_blank">http://cluedenver.org/mailman/listinfo/clue-tech</a><br></blockquote></div><br></div>
<br>_______________________________________________<br>
clue-tech mailing list<br>
<a href="mailto:clue-tech@cluedenver.org">clue-tech@cluedenver.org</a><br>
<a href="http://cluedenver.org/mailman/listinfo/clue-tech" target="_blank">http://cluedenver.org/mailman/listinfo/clue-tech</a><br></blockquote></div><br>