Glad to hear it. But I would still examine my workflow if I were in your position. When you use the command line after switching to root user with su
, usually the terminal prompt reflects that. Running commands as root while assuming that you’re just a normal user can be quite dangerous.
Oh, forgot to clarify that. I knew I was in root, but the issue is that I didn’t know that pressing X or a combination of X and another key (not sure what I pressed) would delete the file.
That, coupled with the fact that I don’t use Ranger all the time. If I was more familiar with it, I imagine I wouldn’t have made that mistake.
I see. Now I’m kinda curious about what ranger
would do if you run it as a normal user, but then try to do things that require elevated permissions. Does it show a prompt at all?
Will test it shortly.
Also, reading through the manual, it seems it was D and not X that I pressed.
EDIT: I remember what happened now. I was trying to press CTRL + S with the hope that it would save the file, but I hit D instead.
EDIT 2: Just tested it. It’s strange, but as a regular user, I get a prompt that asks me what I want to do when I press D.
From the manual:
Moving a file differs very little from copying it: just use
dd
instead ofyy
at the beginning.
I think what happened is I pressed DD and it Cut the file, which meant that I could’ve then pressed PP to paste. But I didn’t know that.
I first search on online for a solution. If I can’t find it, I try again with a different error. If I still can’t find it, I go on Discord and recently here to ask for help.
For something new that I want to try, I look at the wiki/manual for that and search online as well if needed.
Other… (Explain Below)
Reinstall.