This question already has an answer here:

how can I move a file to trash using an alias?

marked as duplicate by Radu Rădeanu command-line Sep 17 '14 at 6:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.