Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

403
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!