What Happened When I Tried to Use the `rm -rf` Command?

0
11
Asked By CuriousCoder92 On

I accidentally entered the command without the dot, so I ran `rm -rf` instead of `rm -rf .`. I was worried about what could happen since I'm on the latest Fedora with KDE, but it seems like only my browser history, Steam settings, and some other minor things were affected. Nothing in my downloads or system folders were deleted. Did not using 'sudo' save me from a disaster?

3 Answers

Answered By BackupBuddy23 On

If you run `rm` without 'sudo', it generally limits your deletion scope to your home directory. So, any crucial system files or folders probably remained untouched, which is great! Just remember to back things up regularly and really double-check commands like these before hitting Enter.

Answered By TechieTom58 On

So you meant to run `rm -rf .` but ended up just running `rm -rf`, right? It's really important to confirm exactly what command you ran for the best advice. But if you really did enter `rm -rf /*`, it sounds like avoiding 'sudo' was a lifesaver, as it typically restricts the command to your user directory and prevents irreversible deletions.

Answered By LinuxGuru99 On

Yeah, if you don't use 'sudo', you usually can only delete files in your home and maybe some other user-mounted directories. That certainly would keep most of your system safe from deletion. Always a good idea to be cautious and maybe use a virtual machine for testing commands you're unsure about!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.