Some time you have accidentally delete some file which you are not suppose to do. So what will you do in that case?
The option with you is to enable trash (Recycle bin) for hadoop, and define fs.trash.interval
to one day with 1440 Minutes or more or less according to the cost of data you host in hadoop.
You can do it in following way :
Open core-site.xml and paste following parameter