What will happen if I type a command rm -rf /*
- Is all files of root directory gets deleted
or
- It won't be able to enter into that directory
or
- If it is delete the all data then is it is possible to reproduce that data
@Acetech first, don't do that.
That command will do a recursive deletion of all the the directories under /. It will delete all of /bin first, then /boot, then /dev, etc. etc. At some point it'll delete something that will cause significant system errors and your machine will stop functioning. After a reboot, for which you will probably have to hard-poweroff the machine, upon booting back up, it will likely not complete it's boot.
This is not really something you can repair. Instead, you'd have to do a re-installation and once the machine is re-installed, access system backups to restore data onto it.
Not really a situation you want to be in.
-STM
Try it! Create a virtual machine with a snapshot. Issue the command (with privleges) and see what happens. Then, when you've satified your curiosity, restore the virtual machine from the snapshot.
I just did it. I got a lot of "permission denied" messages and then it simply locked up. .I had to hard reboot.
Upon reboot, I got a grub rescue> prompt.
Reverted the snapshot and all was good!
You sit in a very confortable chair, and cry.
@Acetech first, don't do that.
That command will do a recursive deletion of all the the directories under /. It will delete all of /bin first, then /boot, then /dev, etc. etc. At some point it'll delete something that will cause significant system errors and your machine will stop functioning. After a reboot, for which you will probably have to hard-poweroff the machine, upon booting back up, it will likely not complete it's boot.
This is not really something you can repair. Instead, you'd have to do a re-installation and once the machine is re-installed, access system backups to restore data onto it.
Not really a situation you want to be in.
-STM
Try it! Create a virtual machine with a snapshot. Issue the command (with privleges) and see what happens. Then, when you've satified your curiosity, restore the virtual machine from the snapshot.
I just did it. I got a lot of "permission denied" messages and then it simply locked up. .I had to hard reboot.
Upon reboot, I got a grub rescue> prompt.
Reverted the snapshot and all was good!
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.