Dear Sir / Madam.
I hope you are well.
I wrote a script in bash to backup files before moving, copying or
deleting them, it's at https://gitlab.com/rydal1/save-my-bacon.
I wondered if this could become part of the core cp, mv and rm commands?
As explained it backs up files before deleting them or overwriting them
to a /recycled directory.
On deleting more than 1Gb of data (or as set by root) it asks the user
if they want to continue to delete said files.
It doesn't get invoked on deleting from /recycled and can be bypassed
with "-z".
It can also be applied to rsync, scp and ln).
I have a friend who knows C (I don't) who can submit a pull request if
you're interested.
Thanks,
Rob Brew.
https://likeme.mx/rydalinc <- digital business card.