Re:Suicide Linux (2011)
by hurin on Saturday April 18, 2015 @06:23PM
(#9401318)
You could replace rm with an alias to small script, e.g. mv to ~/.trash rather than deleting the target. The trash can be auto-cleared based on space constraints or after a certain time.
[ Parent
| on HN ]
libtrash does this by hooking libc so it works for anything that deletes files (unless it's statically compiled...) - it's been around for ages. http://pages.stern.nyu.edu/~marriaga/software/libtrash/