a command from terminal erased everything

Last week, I wanted to uninstall Anaconda and run (rm -rf anaconda3) from the terminal. As a result, I was signed out of my Apple account, and everything on my desktop, in the documents, was gone. Is there any explanation for what happened? I Have a MacBook Air M1, 2020.

I don't think that command, as written, would have been able to cause that. Are you sure you didn't do something like rm -rf . /anaconda3 or rm -rf ~ /anaconda3 (note the spaces)?

(EDIT: note that / is a forward slash, /)

That space would have meant remove everything in the home directory and anaconda3 (assuming in the former case, that you ran the command in your home directory, which is usually the default location to run a shell command from).

As an aside, I'm new here but I don't think this is the best place to ask a question like this as it's intended for software development questions (see Quinn's Top Ten DevForums Tips). You'd probably be better off asking either on the Apple Support Communities or https://apple.stackexchange.com.

a command from terminal erased everything
 
 
Q