3 ms·
There is libtrash (http://pages.stern.nyu.edu/~marriaga/software/libtrash/ http://pages.stern.nyu.edu/~marriaga/software/libtrash/), which does something very s
by tmhedberg 15y ago
There is libtrash (http://pages.stern.nyu.edu/~marriaga/software/libtrash/ http://pages.stern.nyu.edu/~marriaga/software/libtrash/), which does something very similar. It adds a library to your LD_PRELOAD variable which intercepts unlink syscalls and moves deleted files to $HOME/Trash instead of actually deleting them. The nice thing about this is that it works transparently, and not just for /bin/rm, but for anything that deletes files.
That's not to say it couldn't be improved upon, though.