A scary thought (running “del * /a /f” in root of boot drive)

NTLDR missing error message - click for full-res. version
 
Here’s another scary thought, I was playing around with different RSS readers in my virtual machine today and by the end of the testing session, I decided to run the following command in the root of the boot drive and see what will happen:
 
del * /a /f
 
I found out I can delete all files in the root directory except pagefile.sys – ok… not that much surprise here.  BUT, the worrying thing is that windows file protection didn’t kick-in and replace all those files that gotten deleted – you know, those files that you actually need to boot?  Like boot.ini, NTDETECT.COM, ntldr etc…?
 
I guess the lesson here is to be careful what you do with command-line (especially those of you who always wants to try "What will happen if I press this big red button?").  Yes, it (the command-line) is very powerful but can also screw things up pretty quickly… (though that’s kinda obvious anyway…)
 
Well, now I know what I should do for a prank. not to run in my real machine  .
 
(Though you’d probably be glad to know that you won’t be able to delete those boot files by running del * /a – but I still won’t recommend you trying that on a production system…)
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: