将文件最佳组合到4.8GB的块 [英] Optimal combination of files to the blocks of 4.8GB

查看:74
本文介绍了将文件最佳组合到4.8GB的块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的驱动器有DMG块.它们的大小总和严格低于47GB.我有11张DVD,每张4.7GB.我想使用尽可能少的DVD,而不使用压缩功能(问题可能是多余的,因为它考虑了DMG文件的最佳组合.如果需要,可以考虑使用压缩文件. ).

My drive has DMG-blocks. The sum of their sizes is strictly below 47GB. I have 11 DVDs, each of the size 4.7GB. I want to use as small amount of DVDs as possible, without using compressing (the problem may be superflous, since it considers the most optimal combinations in terms of DMG-files. You can think it in terms of compressed files, if you want.).

您可以看到DMG文件具有任意大小.如此之多的解决方案都是可能的.

You can see that the DMG-files have arbitrary sizes. So many solutions are possible.

find . -iname "*.dmg" -exec du '{}' \; 3&> /dev/null

1026064 ./Desktop/Desktop2.dmg
5078336 ./Desktop/Desktop_2/CS_pdfs.dmg
2097456 ./Desktop/Desktop_2/Signal.dmg
205104  ./Dev/things.dmg
205040  ./Dev/work.dmg
1026064 ./DISKS/fun.dmg
1026064 ./DISKS/school.dmg
1026064 ./DISKS/misc.dmg
5078336 ./something.dmg

DVD中的文件可以具有任意顺序.例如,CS_pdfs.dmg和Signal.dmg不必位于某个磁盘上.

The files in DVDs can have an arbitrary order. For example, CS_pdfs.dmg and Signal.dmg do not need to be on the some disk.

那么您如何找到使用尽可能少的DVD的方法?

So how can you find the way to use as small amount of DVDs as possible?

推荐答案

完全替代的解决方案:使用 split 并将边框切成多张DVD.您将获得除最后一个磁盘以外的每个磁盘的100%利用率. http://unixhelp.ed.ac.uk/CGI/man-cgi?分裂

Totally alternate solution: Use split and cut up the borders onto multiple DVDs. You'll get 100% utilization of every disk but the last. http://unixhelp.ed.ac.uk/CGI/man-cgi?split

这篇关于将文件最佳组合到4.8GB的块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆