Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Re: Cleaning up your hard disk

by l3nz (Friar)
on Jan 26, 2004 at 12:54 UTC ( #324124=note: print w/replies, xml ) Need Help??


in reply to Re: Cleaning up your hard disk
in thread Cleaning up your hard disk

Of course you could also
open F, ">file.txt"; while() { print F chr rand( 20 ) + 65; }
And break it when it's done.

Replies are listed 'Best First'.
Re:x3 Cleaning up your hard disk
by grinder (Bishop) on Jan 26, 2004 at 14:11 UTC

    No, not a good idea.

    This will use all the bit patterns between 100_0001 and 101_0101. Of interest is that the upper 3 bit are always set to 010. This flaw might be sufficient to allow a sufficiently motivated person to extract something useful.

    This would be better written as

    1 while print F chr(rand(256));

    As an added bonus, when the file system is full, the print wil fail, the call will return 0 and bingo! you fall out of the while. At least I believe that that is what should happen. You'll forgive me if I don't try this out on my own filesystem...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://324124]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2022-08-07 19:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?