createfile (C)

 

createfile is useful for filesystem limits testing, or just for creating a binary file with a specific size.
you can download the source code and executeable as a single createfile.zip file.
it is now available as a DOS version as well as a windows version. It is under the GPL3 license. lsm file.


01/31/2010  22:57           138,189 createfile.zip

SHA512 createfile.zip
8b078ebf8c8ac9a4 bda312e6b71c8070 028559bff04eba25 96afde388ac08f58
ada5b318126c2d5d bd5abb31b35cbdd2 e09e3da5de7905c8 727ca7ca192a5a69

MD5 createfile.zip
ba45bb979829b5958555d4af30eca21b

Performance: 1GB/min on a SATA II drive. 512MB/min or less on a busy computer.

Warning: if you fill up your disk, your OS may grind to a halt or act
unpredictably. check your disk space first and make sure you
get your numbers correct and leave yourself enough disk space
left!

compiled with free Borland C++ 5.5 command-line compiler for windows, and DJGPP for DOS version


C:\prj\createfile\createfile-3.8\win>createfl
usage: createfl [-?] [-h[elp]] [-v[ersion]]
       createfl [-b[yte] integer8] -[r[andom]] [-s[ize] integer63] [-f[ilepath]
filepath]
createfile fills file at filepath with integer data bytes, 63-bit-integer bytes
in size.
integer can be decimal (plain or starting with 0d), hex starting with 0x, octal
starting with a 0 0o or 0q, or binary starting with 0b.
-filepath default is .\JUNKFILE
-byte default is 0x00. you specify an 8-bit integer.
-random is used or -byte. -random fills with random data (slower).
-size default is 0
-h or -help or -? or no arguments gives this help and exits.
-v or -version gives the version number and exits.
Performance: 1GB/min on a SATA II drive. 512MB/min on a busy computer.
Copyright 1993,2007,2008,2009 Jim Michaels,under GPL3 license.

biolerplate

gcc compiler note: -fpack-struct cannot be used with iostream or anything to do with libstdc++ (including locale which includes iostream) without getting lots of errors.

The dos version is compiled with DJ Delorie's djgpp (gcc for DOS). It can be obtained at DJDelorie.com/djgpp.

The windows version was compiled with Borland C++ 5.5 (free edition). It is available at article (may include patches), free compiler (requires regisration).

The windows version was also compiled with MinGW 5.1.4 which is a GNU compiler set for windows. it has the peculiarity that it requires any use of __int64 to #include <basestd.h>, and it also doesn't allow 64-bit constants in the microsoft/borland style of appending i64 to the number. it requires you to use the gcc LL instead, however, printf does use %I64d rather than the normal gcc %lld. If you use %lld, your program will crash and do the DrWatson error report thing.


Copyright 1993,2007,2008,2009 Jim Michaels

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.