What happens when you do "rm -rf /*"

Just for the fun of it. Here is what happens:

[root@s10 ~]# cd /
[root@s10 /]# dir
bin   dev  initrd  lost+found  misc  opt   sbin     srv  tmp  var
boot  etc  lib     media       mnt   proc  selinux  sys  usr
[root@s10 /]# rm -rf *
rm: cannot remove directory `boot': Device or resource busy
rm: cannot remove directory `dev/shm': Device or resource busy
rm: cannot remove `dev/pts/1': Operation not permitted
rm: `proc/asound/ICH' changed dev/ino: Operation not permitted
[root@s10 /]#
[root@s10 /]# dir
-bash: /usr/bin/dir: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
[root@s10 /]# ll
-bash: ls: command not found
[root@s10 /]# reboot
-bash: /sbin/reboot: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

Since the processes are still running, SSH still accept connections, but cannot sign in, can’t run anything either. Was it fun?!


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *