Quote:
I am also thinking it might be a good idea to have a waste paper bin in OpenBSD.
|
There are ways to make back up copies of files and directories, and you can set up your system to do it automatically, for example:
before editing.
Or, for example, BEFORE blindly clicking or typing the delete option, and then saying yes, when it tries to warn you,...
Code:
mv foodir foodir-trsh
Will move the directory "foodir" to a directory "foodir-trsh", which could be in a directory name "waste-bucket".
Code:
mv foodir /home/anyuser/waste-bucket/foodir-trsh
====== edited =======
I am not sure this can be applied to OpenBsd, I think it could be, the main point is ranger can be configured to move the directory or files to a trash dir, (waste paper) :
Quote:
from: https://wiki.archlinux.org/index.php/Ranger
Move to trash
To add a keybind that moves files to your trash directory ~/.local/share/Trash/files/ with DD, add to ~/.config/ranger/rc.conf:
Code:
map DD shell mv %s /home/${USER}/.local/share/Trash/files/
|
Myself, I avoid using any GUI file managers when using the console, for the obvious reasons, as what happend to the OP, it is to easy to make a mistake, and delete something one does not want to delete. Also, I think if one must have a file manger when using the console or for example when accessing via ssh, well MC would be a better choice, in my opinion.
Quote:
so this post is more of a warning for anyone who is using Ranger.
|
Saying yes, after the file manager tries to warn you and asks if you are sure you want to delete a directory, is not a bug, it does what it says it will, when you say yes. I have made the same mistake myself but using other file managers , so the warning should be applied to any GUI file manager.