View Single Post
  #5   (View Single Post)  
Old 14th April 2010
ephemera's Avatar
ephemera ephemera is offline
Knuth's homeboy
Join Date: Apr 2008
Posts: 537

If you are looking to minimize space wastage on the dvd, then this is a bin packing problem:

If you want something simple perhaps you try something like this:

1. Sort the rpm files in decreasing order by size.
2. Create 18GB/4GB = 5 bins (directories).
3. Pick one item off the top of the sorted list & put it into the first bin where it can fit.
4. Repeat step 3 until the list is empty.

Give it a try & don't forget to show us your script when its done. :-)
Of course, if you have any problems while writing the script you can always ask.

Last edited by ephemera; 15th April 2010 at 10:27 PM.
Reply With Quote