Creating a file with $SIZE
fakeaddress at nowhere.org
Thu Mar 13 16:55:21 CET 2008
> I think I am not clear with my question, I am sorry. Here goes the
> exact requirement.
> We use dd command in Linux to create a file with of required size. In
> similar way, on windows I would like to use python to take the size of
> the file( 50MB, 1GB ) as input from user and create a uncompressed
> file of the size given by the user.
> ex: If user input is 50M, script should create 50Mb of blank or empty
You mean all zero bytes? Python cannot guarantee that the system
will not compress such a file. For testing data transfer rates,
random data is a usually a better choice.
More information about the Python-list