What happens if I run rm -rf without sudo?

0
16
Asked By TechieTurtle84 On

I was trying to use the `rm -rf .` command but accidentally left out the dot, so I just ran `rm -rf`. Fortunately, it seems like nothing critical got deleted, just some browser history and settings. I'm using the latest Fedora and KDE version, if that's relevant. I'm wondering why it didn't delete more files like I expected. Is it possible that not using `sudo` protected my system?

3 Answers

Answered By LinuxGuru77 On

Yeah, since you didn’t use `sudo`, the command could just delete files in your home directory and maybe in any mounted drives, like those you access through Dolphin. If there were no files to delete in those locations, you’re safe. Good job on checking!

Answered By FileNinja001 On

To clarify, if you ran `rm -rf` without any additional arguments, it likely just looked for a file named 'rf' in your current directory and did nothing else. Make sure you provide the full context next time for accurate help!

Answered By CuriousCoder92 On

It looks like you wanted to run `rm -rf .` but ended up running `rm -rf` without specifying a directory. Without `sudo`, that command can only delete files in your user directory, which is probably why nothing serious happened. Always double-check your commands before executing them to prevent mishaps!

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.