Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

405
Visualizações
Linux command line rm /*

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?

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

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
over 4 years ago · Santiago Trujillo Relatório

0

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.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda