Hello booboo84, welcome to LQ,
how about your knowledge about Linux and shellscripting? as you know, per our forumrules we don't do your homework, you should instead post some code which you've written so far, then we can help you.
Some thoughts about your problem: the second point is relatively easy to achieve with deleting the content of the dustbin-directory.
In order to get point three done you will have in point one to store the information from where the file has been moved to the dustbin. How would you do this? which information do you need and how can you get it, how can you store it?
A useful guide to shellscripting is here:
http://tldp.org/LDP/abs/html/
Markus