ununlink is link() on a /proc/<pid>/fd/<fd> entry. Assuming some process still has the file open, that is.
(Whereas moving to recycle-bin is a manual process you need to remember to do).
alias rm trashYou need linkat() with the AT_SYMLINK_FOLLOW flag enabled.