by capableweb · 4y ago · 0 comments
rm () {
mv "$@" ~/.trash
}
So any time I use rm, it actually just moves it to ~/.trash instead. Not fool-proof nor perfect, but have saved me at least once so found it to be good enough for now.Maybe it'd be best to just give this command a new name like `delete` or `trash` just to be safe.
But this would defeat the original purpose, i.e. the prevention of someone accidentally using rm.
That said, an accidental removal of files has never been a problem for me (an accidental chmod -R caused me more woes once), and these days with snapshots it's a complete non issue.