Re: rm -rf /

From: Bryan Donlan (bdonlan_at_gmail.com)
Date: 09/08/05


Date: Thu, 08 Sep 2005 00:53:05 -0400

Jacob wrote:

> On Tue, 06 Sep 2005 22:33:17 +0100, a posting issued forth from Brian
> Wakem...
>> What actually happens if you do rm -rf / ?
>>
>> Will the system just crash at some point or will it complete and leave
>> you at a prompt where you can do nothing?
>>
>> I ask because I'm about to decommission a server and feel like wiping
>> everything on it. Trouble is I need to be able to powerdown afterwards
>> (it's a remote server).
>>
>
> Without experimenting, for obvious reasons, maybe (*DON'T TRY THIS AT
> HOME, KIDS!*):
>
> shutdown -P +1440 & for x in /dev/?d?; do shred $x & done

If you erase the data on the hard drive partitions, shutdown will be unable
to page-in additional data once it awakens. While shred is running, all
read-only data (code included) for shutdown will likely be evicted as well,
so it'll simply segfault when it finally gets around to running.

Of course, this is all assuming the filesystem driver doesn't give up and
trigger a kernel panic first, or init segfaults, or something.

-- 
λz.λi.i(i((λn.λm.λz.λi.nz(λq.mqi))((λn.λz.λi.n(nzi)i)(λz.λi.i(((λn.λz.λi.n
(nzi)i)(λz.λi.i(iz)))zi)))((λn.λz.λi.n(nzi)i)(λz.λi.i(iz)))zi))


Relevant Pages

  • Cant perform shutdown of remote computer after installing KB835732
    ... I am currently running Windows 2000 with Service Pack 4. ... need to perform a shutdown of a remote server, ... call to initiate the remote shutdown. ...
    (microsoft.public.win2000.windows_update)
  • Cant perform shutdown of remote computer after installing KB835732
    ... I am currently running Windows 2000 with Service Pack 4. ... need to perform a shutdown of a remote server, ... call to initiate the remote shutdown. ...
    (microsoft.public.win2000.security)
  • Re: Block windows remote shutdown command on a domain
    ... administrators from the Force Shutdown option and he added only ... Then I ran the shutdown command and it still shutdown his PC. ... > This is done in Group Policies, Computer Configuration, Windows Settings, Security Settings, Local Policies, User Rights Assignments ... >> believe it is a registry setting on the remote server itself. ...
    (microsoft.public.windowsxp.security_admin)
  • Remote shutdown.exe not working
    ... When I try to shutdown a remote win2003 server using shutdown.exe (from my ... if the remote server is in logoff state. ... J Justin ...
    (microsoft.public.windows.server.general)