Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re x 5: one-liner hogs

by baku (Scribe)
on Feb 05, 2001 at 20:23 UTC ( #56418=note: print w/replies, xml ) Need Help??


in reply to (tye)Re4: one-liner hogs
in thread one-liner hogs

Serves me right for working on a machine with no /dev/zero.... argh.

The <> operator will seek $/, never find it, and just fill memory to the rlimit. Not great for a disc test.

That makes the 'line' read:

perl -e 'open M,"/sbin/mount|grep -v':'";while(<M>){($m)=split($_); if(fork){open Z,"</dev/zero";open F,">$m/.#overflow#";while(read(Z, $x,4096)){print F $x}}};

Bleh.

cat /dev/zero > /tmp/kill.system

Less effective, but easier to type. And probably a good way to muck up 90% of systems :-)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://56418]
help
Chatterbox?
[Dumu]: Hello @jedikaiti & other Monks!
[Dumu]: Can't rememeber how to correctly tag other monks in chat
[Dumu]: hello jedikaiti
[Dumu]: got it. Anyway. Perl question. Can you use binmode more than once with an open filehandle to read a file first in binary mode, then in utf8 mode?

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (12)
As of 2017-11-20 17:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (290 votes). Check out past polls.

    Notices?