CentOS 7, sudo su. I am not pro in Linux command line. But I wanted to delete all files inside current directory. And I putted:
rm /*
After that many commands doesn't worked (ls for example).
What this command did? And how it might harm to system?
You actually removed everything on your hard drive!
Don't run commands as super user if you don't know what are they and what they do!
the rm command removes something.
the / means the root directory. In Unix-based OS like Linux, directories are something like this:
/
├── bin -> usr/bin
├── boot
├── dev
├── etc
├── home
├── lib -> usr/lib
├── lib64 -> usr/lib
├── lost+found
├── media
├── mnt
├── opt
├── proc
├── root
├── run
├── sbin -> usr/binvar
├── srv
├── sys
├── tmp
├── usr
└── var
And all of them are inside the root directory which we show it as /
And I should say that * in terminal means "Everything" (code 42).
So you asked to remove "Everything inside / directory" Now everything inside your linux OS is deleted (exept if something stoped before the process compeleted)
Anyway, insatall another fresh Centos and startover. And thank GOD you didn't write this:
rm -rf /*
Try to learn commands from websites and before entering any new command, use man to read it's manual. For example the command that I used to get that directory tree is tree and you can read about it using:
man tree
Yes, you deleted important files (except those who were already in use by processes).
You should use rm ./* in order to delete all files and folders in current directory. You may need use command above with option -rm for recursive and force delete.