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?
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.