This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
LDDestroier's profile picture

Filler - Program that fills up hard drive with nonsense

Started by LDDestroier, 03 May 2015 - 10:13 PM
LDDestroier #1
Posted 04 May 2015 - 12:13 AM
This program serves no purpose other than to fill up a hard drive with a file filled with the letter 'a'.
It is located at '/.bigfile', and for some reason cannot be deleted, even after rebooting or using file.close().
Anyway, don't do anything stupid with it.


How it works:

1. It deletes itself to make sure the hard drive doesn't have a byte left after it's done.
2. It finds the hard drive size, and then gets the greatest number it's divisible by, from 1 to 100000. Let's call it 'divisor'.
3. It creates a variable (longString) that is exactly the hard drive space divided by the divisor. This is done to increase the speed of the processing without leaving a byte out of place.
4. It makes a file ('/.bigfile') that fills up the whole hard drive, leaving no byte left.
5. In the meantime, it shows you how many iterations it has to go, and the percent done.
6. Megaturd dropped!
Edited on 04 May 2015 - 02:53 AM
InDieTasten #2
Posted 04 May 2015 - 12:23 AM
you could add customizable filesizes chosen at the beginning of the program, maybe in (K)Bytes or in percent of harddrive space.
also, if input is greater than disk space you could temporarily generate diskspace by creating and removing a directory(until one of the last releases, where this bug was fixed).
making the program a little more malicious though xD your choice^^
LDDestroier #3
Posted 04 May 2015 - 12:52 AM
you could add customizable filesizes chosen at the beginning of the program, maybe in (K)Bytes or in percent of harddrive space.
also, if input is greater than disk space you could temporarily generate diskspace by creating and removing a directory(until one of the last releases, where this bug was fixed).
making the program a little more malicious though xD your choice^^

I'm still working on this, so expect bugs until I say I'm done.

Okay, got some progress. I've added the 'isDeletable' option, which tries to make the file non-deletable, but it only works for one or two reboots, if at all. However if it wasn't deletable, then I guess that would be bad. Anyway, done for now. Don't break anything.
Lyqyd #4
Posted 04 May 2015 - 04:53 AM
Closed as malicious.