Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You could use LD_PRELOAD to replace unlink with a version that passes an fd to a running recycle-bin daemon. That approach doesn't really have much, or any, advantage over just moving files to a recycle-bin folder and keeping track of items in there.


It would "automatically empty" the recycle bin at each shutdown though.


Doesn't it have the advantage that "rm" and co are then made automatically undo-able?

(Whereas moving to recycle-bin is a manual process you need to remember to do).


  alias rm trash


Also a manual process -- and per user at that...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: