I've been bitten a few times recently with rm
ing things I shouldn't have - for example, forgetting to ulink
symlinks, not rm
them.
I'm thinking of writing a small bash script to simply move the target to ~/.local/share/Trash
, as I haven't grasped restoring files (seems to involve a lot of Linux hackery that I'm not going to achieve any time soon).
The only problems I can think of are:
- scripts/applications needing to
rm
files (really a problem? I could also get used to callingrm!
or something), - files being moved to Trash while files there already have the same name (not sure how Ubuntu get's around that at the moment, could be fixed by appending
md5(name + time())
to the name.
Of course the real answer's in backing up or just learning not to do silly things but I'd like an accommodating solution none-the-less.
Is this a really terrible idea or something that could be done?