[Gambas-user] fastest way to "zero-out" a huge binary file

kevinfishburne kevinfishburne at ...1887...
Sun Jan 24 06:02:25 CET 2010



Kadaitcha Man wrote:
> 
> In a terminal, type:
> 
> info coreutils 'dd'
> 
> You only need create the file once, then copy it whenever you need to
> during testing. If you really must create the file every time, let dd
> do it by using Gambas' Exec command.
> 

Excellent, thanks. I seem to have found something horrifying while trying to
create the file using GAMBAS however; using the SEEK statement with an
argument greater than 2 GB raises a "Bad argument" error. While that doesn't
affect my ability to create the file, it kills me later when trying to read
and write to it. Other than using a different version of GAMBAS all I can
think to do is to create four 2 GB data files, which will create additional
overhead in the read/write procedures that access the file. Actually since
my file is slightly larger than 8 GB I'll need to create five separate
files. :(

-----
Kevin Fishburne, Eight Virtues
www:  http://sales.eightvirtues.com http://sales.eightvirtues.com 
e-mail:  mailto:sales at ...1887... sales at ...1887... 
phone: (770) 853-6271
-- 
View this message in context: http://old.nabble.com/fastest-way-to-%22zero-out%22-a-huge-binary-file-tp27290885p27292295.html
Sent from the gambas-user mailing list archive at Nabble.com.





More information about the User mailing list