Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 1012 Vote(s) - 3.54 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Quickly create large file on a Windows system

#11
Check out RDFC

[To see links please register here]


RDFC is probably not the fastest, but it does allocate data blocks. The absolutely fastest would have to use lower level API to just obtain cluster chains and put them into [MFT][1] without writing data.

Beware that there's no silver bullet here - if "creation" returns instantly that means you got a sparse file which just fakes a large file, but you won't get data blocks/chains till you write into it. If you just read is you'd get very fast zeros which could make you believe that your drive all of the sudden got blazingly fast :-)

[1]:

[To see links please register here]

Reply

#12
Open up Windows Task Manager, find the biggest process you have running right click, and click on `Create dump file`.

This will create a file relative to the size of the process in memory in your temporary folder.

You can easily create a file sized in gigabytes.

[![Enter image description here][1]][1]

[![Enter image description here][2]][2]

[1]:

[2]:


Reply

#13
PowerShell one-liner to create a file in `C:\Temp` to fill disk C: leaving only 10 MB:

[io.file]::Create("C:\temp\bigblob.txt").SetLength((gwmi Win32_LogicalDisk -Filter "DeviceID='C:'").FreeSpace - 10MB).Close
Reply

#14
I was looking for a way to create a large dummy file with space allocation recently. All of the solutions look awkward. Finally I just started the `DISKPART` utility in Windows (embedded since Windows Vista):

DISKPART
CREATE VDISK FILE="C:\test.vhd" MAXIMUM=20000 TYPE=FIXED

Where *MAXIMUM* is the resulting file size, 20 GB here.
Reply

#15
The simplest way I've found is this free utility:

[To see links please register here]


Creates dummy files of arbitrary size that are either filled with spaces or are filled with non-compressible content (your choice). Here's a screenshot:

[![enter image description here][1]][1]


[1]:
Reply

#16
I found an excellent utility that is configurable at

[To see links please register here]

.

It fills the target file with random data, so there are no problems with sparse files, and for my purposes (testing compression algorithms) it gives a nice level of white noise.
Reply

#17
Another GUI solution : WinHex.

“File” > “New” > “Desired file size” = [X]
“File” > “Save as” = [Name]

Contrary to some of the already proposed solutions, it actually writes the (empty) data on the device.

It also allows to fill the new file with a selectable pattern or random data :

“Edit” > “Fill file” (or “Fill block” if a block is selected)
Reply

#18
You can try this C++ code:

<!-- language: lang-cpp -->

#include<stdlib.h>
#include<iostream>
#include<conio.h>
#include<fstream>
#using namespace std;

int main()
{
int a;
ofstream fcout ("big_file.txt");
for(;;a += 1999999999){
do{
fcout << a;
}
while(!a);
}
}

Maybe it will take some time to generate depending on your CPU speed...
Reply

#19
Simple answer in Python: If you need to create a large real text file I just used a simple `while` loop and was able to create a 5 GB file in about 20 seconds. I know it's crude, but it is fast enough.

<!-- language: lang-py -->

outfile = open("outfile.log", "a+")

def write(outfile):
outfile.write("hello world hello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello world"+"\n")
return

i=0
while i < 1000000:
write(outfile)
i += 1
outfile.close()

Reply

#20
Plain ol' C... this builds under MinGW GCC on Windows XX and should work
on any 'generic' C platform.

It generates a null file of a specified size. The resultant file is NOT just a directory space-occupier entry, and in fact occupies the specified number of bytes. This is fast because no actual writes occur except for the byte written before close.

My instance produces a file full of zeros - this could vary by platform; this
program essentially sets up the directory structure for whatever data is hanging
around.

<!-- language: lang-c -->

#include <stdio.h>
#include <stdlib.h>

FILE *file;

int main(int argc, char **argv)
{
unsigned long size;

if(argc!=3)
{
printf("Error ... syntax: Fillerfile size Fname \n\n");
exit(1);
}

size = atoi(&*argv[1]);

printf("Creating %d byte file '%s'...\n", size, &*argv[2]);

if(!(file = fopen(&*argv[2], "w+")))
{
printf("Error opening file %s!\n\n", &*argv[2]);
exit(1);
}

fseek(file, size-1, SEEK_SET);
fprintf(file, "%c", 0x00);
fclose(file);
}

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through