Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Splitting up files into equal sized groups O/T



On Sat, May 12, 2007 at 12:25:08PM +0000, zzapper wrote:
> Hi

Hi.

> I want to zip up 50 or so very large files into 4 huge zip files.
> 
> The problem is that the files themselves are all very different sizes,
> I want to find a way of splitting up the list of files into four lists
> so that the size of the resulting zips are roughly the same size.
> 
> (I don't want to use split zips)

Do you mean you want to put 50 files of different sizes into 4 new files
of the same size? and doing this without splitting any of the 50 files?

> Ideas?

If the above is true then I think you are trying to solve the knapsack
problem, and should probably resolve to to some of the solutions
suggested here [1].

[1] http://en.wikipedia.org/wiki/Knapsack_problem

-- 
regards
Thor Andreassen



Messages sorted by: Reverse Date, Date, Thread, Author