Please note that simply looking at a file's size does not do the same thing as du. The du command will tell you the amount of disk space that each file is using by rounding up to the current sector size. This discrepency was the whole purpose of cog's Filesys::DiskUsage 0.04 version - to allow you to better approximate what the du command does. Note that you have to tell Filesys::DiskUsage what sector size to use, which is moderately (but not completely) unfortunate.
This is completely fortunate, however, in the OP's scenario. I'm betting that the 4GB boundary is for DVDs. And DVDs will not have the same sector size as their ext3 or jfs or ntfs or whatever filesystem. So what du thinks is the total space and what it will be on the DVD may not match. It may be close enough, but maybe not.
As I said above, I did exactly the same thing for CDs. And the sector size on CDs is 1K. Which doesn't often match the sector size on hard disks. So I use Filesys::DiskUsage and pass in a sector-size of 1024, and I know what the disk usage will be on my target media. In my case, the difference will be dozens of MB between what du reports on the hard disk and what it would report on CDs, and that difference could significantly alter the layout of the CDs, possibly even reducing the number of CDs that I need by one - multiplied over the cost of manufacturing, it can save some real dollars, not only likely saving the cost of developing that patch and using it, but also reducing the weight of the box the CDs are in, and producing less ill will from customers who don't like how many CDs we already have in those boxes - that's worth real money, too.
In reply to Re^2: Using an array, how do I search one directory area and copy to another area
by Tanktalus
in thread Using an array, how do I search one directory area and copy to another area
by ckaspar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |