Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#299606 - 21/06/2007 19:10 How do I fill up a hard disk really really quick?
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31596
Loc: Seattle, WA
"Install Windows Vista". yeah yeah I know I know. But I'm serious this time.

I'd like, for the purposes of doing quick diskspace tests, a fast way to create a hugantic ginormous file of the specified size that is ==(available diskspace minus some specific number) big.

Anyone know of a quick way to do that other than doing a crapload of big file copies?

I'm sure there's an internal microsoft tool to do it (or a known way to do it from the command line), but I'm in a situation where I know that you guys could give me an answer quicker than I could find it by asking around here.

Also, I'm aware there's a command to do that sort of thing in Linux, but this needs to be on a windows PC.
_________________________
Tony Fabris

Top
#299607 - 21/06/2007 19:28 Re: How do I fill up a hard disk really really quick? [Re: tfabris]
webroach
old hand

Registered: 23/07/2003
Posts: 869
Loc: Colorado
Ask and ye shall receive: This should do it
_________________________
Dave

Top
#299608 - 21/06/2007 19:29 Re: How do I fill up a hard disk really really quick? [Re: tfabris]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Easy

1. Install a FTP server and set it to allow anonymous uploads
2. Wait

Top
#299609 - 21/06/2007 19:29 Re: How do I fill up a hard disk really really quick? [Re: tman]
webroach
old hand

Registered: 23/07/2003
Posts: 869
Loc: Colorado
Quote:
Easy

1. Install a FTP server and set it to allow anonymous uploads
2. Wait


LMAO!
_________________________
Dave

Top
#299610 - 21/06/2007 19:35 Re: How do I fill up a hard disk really really quick? [Re: tfabris]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Quote:
I'm aware there's a command to do that sort of thing in Linux, but this needs to be on a windows PC.

There's actually more to it than that. Unix provides a virtual device file that produces an infinite amount of data (all zeroes) when read. It also comes with a utility that will copy an arbitrary amount of data from one file to another file. It is the combination of these two things that allows one to do this in Unix, not an individual utility that allows you to create files of a certain size.

That, to me, is the heart of the difference between Unix and Windows. Unix provides you a set of tools to solve problems. Windows provides specific cookie-cutter solutions to specific problems, and if you have a different problem, you need a new cookie cutter.

Which explains why Windows works so well on the desktop. 99% of the users have the exact same needs and need the exact same set of cookie cutters.
_________________________
Bitt Faulk

Top
#299611 - 21/06/2007 19:35 Re: How do I fill up a hard disk really really quick? [Re: webroach]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31596
Loc: Seattle, WA
Quote:
Ask and ye shall receive: This should do it


AND SO IT DOES. Fantabulous. Thanks.


PS: In vista, "create" now has to be "createnew" but whatever.

Gawd I wish they wouldn't change command names like that from version to version but OH WELL.
_________________________
Tony Fabris

Top
#299612 - 21/06/2007 20:15 Re: How do I fill up a hard disk really really quick? [Re: tfabris]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
Quote:
Gawd I wish they wouldn't change command names like that from version to version but OH WELL.


And this is why every windows box I deal with here via our automation system has cygwin and SSHD running on it. The unix tools in cygwin don't just randomly change flags for the fun of it, so my scripts do the same thing on each variant of Windows I encounter.

Top
#299613 - 21/06/2007 20:48 Re: How do I fill up a hard disk really really quick? [Re: wfaulk]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
Quote:
Quote:
I'm aware there's a command to do that sort of thing in Linux, but this needs to be on a windows PC.

There's actually more to it than that. Unix provides a virtual device file that produces an infinite amount of data (all zeroes) when read. It also comes with a utility that will copy an arbitrary amount of data from one file to another file. It is the combination of these two things that allows one to do this in Unix, not an individual utility that allows you to create files of a certain size.


Actually, there's possibly a simpler way to do it here, depending upon what Tony actually wanted -- just open a new file, and use lseek() and ftruncate() to force it to be a humongous size without any significant I/O.

Cheers

Top
#299614 - 21/06/2007 20:59 Re: How do I fill up a hard disk really really quick? [Re: mlord]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Quote:
Quote:
Quote:
I'm aware there's a command to do that sort of thing in Linux, but this needs to be on a windows PC.

There's actually more to it than that. Unix provides a virtual device file that produces an infinite amount of data (all zeroes) when read. It also comes with a utility that will copy an arbitrary amount of data from one file to another file. It is the combination of these two things that allows one to do this in Unix, not an individual utility that allows you to create files of a certain size.


Actually, there's possibly a simpler way to do it here, depending upon what Tony actually wanted -- just open a new file, and use lseek() and ftruncate() to force it to be a humongous size without any significant I/O.

Cheers

Doesn't that make a sparse file?

Top
#299615 - 21/06/2007 21:38 Re: How do I fill up a hard disk really really quick? [Re: tman]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Depending on the filesystem, yes. Most Unix filesystems and NTFS support sparse files, and one would be created in that case. I do not believe FAT supports sparse files.

Of course, I don't know if Tony needed to actually have data in those files or not. Nor do I know how NTFS deals with disk usage when there are large sparse files.
_________________________
Bitt Faulk

Top
#299616 - 21/06/2007 22:22 Re: How do I fill up a hard disk really really quick? [Re: wfaulk]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31596
Loc: Seattle, WA
Quote:
I don't know if Tony needed to actually have data in those files or not.

No, I didn't need data. I just needed to fake out the OS to make it have very little disk space left to test out an installer's ability to handle very little disk space. The command at the top of the thread did exactly what I needed. Thanks, all.
_________________________
Tony Fabris

Top
#299617 - 22/06/2007 15:51 Re: How do I fill up a hard disk really really quick? [Re: tfabris]
davekirk
journeyman

Registered: 02/04/2002
Posts: 56
Loc: Las Vegas
Just for the record, the linked article is wrong. The command argument is "createnew" in WinXP, also.

Top
#299618 - 22/06/2007 17:25 Re: How do I fill up a hard disk really really quick? [Re: davekirk]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31596
Loc: Seattle, WA
oh... good to know.
_________________________
Tony Fabris

Top
#299619 - 25/06/2007 15:37 Re: How do I fill up a hard disk really really quick? [Re: tfabris]
siberia37
old hand

Registered: 09/01/2002
Posts: 702
Loc: Tacoma,WA
If all you want to do is test out what happens when disk space is running out use quotas. Just make a new user and give him a quota entry of like 5 MB or so. When he runs the installer he will run out of disk space (assuming your install is big).

Top