I've often wondered how far the system will actually get if you run rm -rf /. I doubt the OS would be able to erase itself (?)
Bonus Question: After the command has been executed, will rm have removed itself?
Update: I've tested this in a couple of the main unix distributions using VirtualBox and the answers describe exactly what happens. If given the correct parameters, rm will remove every physical bit of data on the disc. However, I ran into some issues when using a version of rm other than the GNU one. For example, I believe BusyBox has their own version and it doesn't let you remove as much as you potentially could.
This question was a Super User Question of the Week.
Read the July 7th, 2011 blog entry for more details or submit your own Question of the Week.
sudo rm -rf /on tinycore/microcore linux and it seems that the OS protects several directories (/sys and others) from being deleted. – MaxMackie Jul 20 '11 at 14:06rm -f /bin/rmonce. Unfortunately, it worked, and I spent the next hour getting the right version ofrmback from GNU coreutils. – squircle Jul 20 '11 at 17:21