Okay, so I have a directory that has lots of files in it. These files are highly-compressed archives of documents, and I want to store these to a set of DVDs. That is, I want to have each archive on a disk, or many disks if its size requires.
The thing is, some of the archives are small, and some are very large (3-4 DVDs). So, I can't reasonably put each archive on its own disc.
An obvious solution to this problem is to
lrzip -o archive.lrzip ./* and then
split -b 4700M archive.lrzip, but this means that whenever I want any files (or any of the archives), I have to retrieve EVERY disk, copy over the whole collection, etc.
I obviously can use split and manually determine the disc boundaries, e.g.: 1G archive, 3G archive, and split a 2G archive into parts to fill the disc, but that's slow.
I know this is a bit of a complicated problem description, but I think the problem is very easy to understand. Does anyone know of a way to sort of split these files along the medium boundaries (whether 4.7GB DVD, ~50GB Blu-ray, 500GB tape, etc)?
EDIT: Having been shown the bin-packing problem, this is a way to solve what I want to do, and considering the idea of a global directory, this could work, but I would prefer to keep the archives in alphabetical order, but it is not necessary.