Question:
How can I make a huge file for testing purposes?
Posthuman
2008-02-06 00:47:06 UTC
For complicated reasons I need to make a single file 4.6GB big. It doesn't matter what program, just a file.

I have the Macromedia Suite, Adobe CS2.. and all the other common programs people generally have.

And I have absolutely no idea how to do so! Is there a program I can download that can make huge dummy files? Or does anyone have a way I can make something that massive with my existing programs?

All answers are greatly appreciated :D
Three answers:
anonymous
2008-02-06 00:57:05 UTC
Take a big file, name it 1, and *copy* it to the root of your disk, C:\. (COPY it, because you'll mess it up in the process so you don't want to be working with an original file.)



Open a command box by clicking START, RUN. Type CMD, press ENTER. In the command box, type the following:



CD \

COPY 1 2

COPY /B 1 + /B 2 /B 3

DEL 1

DEL 2

REN 3 1



Repeat this a couple of times (after the first time, you don't need to type CD \ anymore), and you'll end up with a file named 1 that is many times its original size.



What this does it: it makes a copy of file 1, called 2. These two files are copied together, to a file called 3; this is twice the size of 1. Then 1 and 2 are deleted, and 3 is renamed to 1. Then you start all over.



If you repeat all these steps 5 times, you'll end up with a file that's 32 times larger than the original file named 1.



This works under Windows. The solution of the guy below works when you're using UNIX/Linux.
anonymous
2008-02-06 09:38:16 UTC
open a notepad



type 10 ones inside it

copy it and paste it 10 times.

save it

Now you have a 100byte file.



select all and copy and past the 111111.... 10 times and save.

Now it's up to 1K.

copy and paste the 1K 10 times...

you'll have a 10k file....100k file...1 meg file!



....in a very short time you will have a 4.6GB file with nothing but 1s in it...and it is more efficient than a giant photoshop file that will crash your windows or whatever.
w0osht
2008-02-06 09:02:18 UTC
dd if=/dev/urandom of=/tmp/46GBtestfile bs=128k



or perhaps you could create a dvd-image using your favorite dvd burning program like ImgBurn.. just use it to create a 4.6GB iso file in the iso creation mode (mode->build in the ImgBurn menus)


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Continue reading on narkive:
Loading...