Free Disk Necessary To Retructure A File
Bob Stockler
bob at trebor.iglou.com
Mon Jul 28 13:02:28 PDT 2008
Ken Brody wrote (on Mon, Jul 28, 2008 at 10:25:14AM -0400):
| Quoting Scott Walker (Sat, 26 Jul 2008 18:38:05 -0400):
|
| > John,
| >
| > So are you saying that if I had 10 million bytes free on my disk drive,
| > I could add a field to a file with 400mb as long as the resulting file
| > was not more than 10mb larger.
| >
| > In other words, I don't need free disk space to be anywhere near the
| > size of the file I am restructuring.
| [...]
|
| Correct. If you are growing the file, it is done in place, so you only
| need enough room for the difference in size. On the other hand, if you
| are shrinking the file, you need enough free space for the resulting
| file.
|
| So, going from 400MB to 410MB needs 10MB free space, but going from 400MB
| to 390MB needs 390MB. (This is why you are given the option of not doing
| the actual shrink.) This is because not all systems on which filePro runs
| have the ability to truncate a file.
Could not the shrinking filePro program have been written to
write the shortened records starting at the beginning of the
existing key file, then write free records to the balance of
the space occupied by the file? This would result, according
to how much the records were being shortened, in it being just
a few bytes larger than it originally was.
If it's imperative that the file be truncated, most systems
support Perl, and it can then be used to do it.
Bob
--
Bob Stockler +-+ bob at trebor.iglou.com +-+ http://members.iglou.com/trebor
More information about the Filepro-list
mailing list