[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain -->
- <!--x-date: Wed Dec 15 20:21:01 2004 -->
- <!--x-from-r13: fevnq ng hno.rqh (Oqvgln Eevavinfna) -->
- <!--x-message-id: Pine.LNX.4.44.0412151906090.19702-[email protected] -->
- <!--x-reference: [email protected] --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-subject: To: Jerry Yu... Re: [ale] 2 Perl questions ? -->
- <h1>to: Jerry Yu... Re: [ale] 2 Perl questions ?</h1>
- <li><em>date</em>: Wed Dec 15 20:21:01 2004</li>
- <li><em>from</em>: sriad at uab.edu (Aditya Srinivasan)</li>
- <li><em>in-reply-to</em>: <<a href="msg00561.html">[email protected]</a>></li>
- <li><em>subject</em>: To: Jerry Yu... Re: [ale] 2 Perl questions ?</li>
- <title>to: Jerry Yu... Re: [ale] 2 Perl questions ?</title>
On Wed, 15 Dec 2004, Courtney Thomas wrote:
> Sriad,
>
> I only want the 'picking' to simply be.... to merely add the file's
> sizes until >650MB, then don't add the one that puts the total >650MB
> and the 'moved-to' dir then contains that set the <=650MB, since each is
> moved to the new 'container' dir, and the program stops.
>
> Hope that clarifies my simple objective,
> Courtney
I understood this to mean, that you would like to continue this process
until all files are in directories sized <=650MB.
If so, it is easy to end up with a very large number of directories
Consider 5 files :
1. 100 MB
2. 600 MB
3. 400 MB
4. 100 MB
5. 300 MB
The algo above would create :
dir 1 : 100 (600 pushes it over 650)
dir 2 : 600 (400 pushes it over 650)
dir 3 : 400 + 100 (300 pushes it over 650)
dir 4 : 300
Ideally it is possible to do this as :
dir 1: 100 + 400 + 100
dir 2: 600
dir 3: 300
ie. in 3 dirs instead of 4. If you have a larger number of files, you
could end up with many directories like dir 1 (potentially underutilized)
The aim would be to keep the number of directories to a minimum (latter
case)
Hope that explains what I was trying to get at.
Other replies in the thread describe simple and acceptable solutions to
the problem (box packing problem).
Thanks,
sriad
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00561" href="msg00561.html">To: Jerry Yu... Re: [ale] 2 Perl questions ?</a></strong>
<ul><li><em>From:</em> ccthomas at joimail.com (Courtney Thomas)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00561.html">To: Jerry Yu... Re: [ale] 2 Perl questions ?</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00563.html">[ale] Make RAID 1 during install</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00561.html">To: Jerry Yu... Re: [ale] 2 Perl questions ?</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00565.html">[ale] OT BS DSL/DNS</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00562"><strong>Date</strong></a></li>
<li><a href="threads.html#00562"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>