Users on a linux (CentOS4) machine I administer consistently forget to empty the trash. Since the people work on big files, this can fill up the /home partition very quickly.
Therefore, I would like to create a script that automatically empties the user's trash whenever they log out.
How would I do that?
EDIT I guess I should clarify the situation a little: The computer is attached to a microscope. Users come, log on, take pictures (storing them on the generous scratch space during acquisition), and then they transfer the data onto the server.
Sometimes it happens that pictures that looked good at first glance are crap, so the users delete the pictures - which sends them to the trash in /home - instead of moving them to the server. Or they copy the data instead of moving, and then they delete it later.
Eventually, they log off so that someone else can use the microscope. If they just filled up /home with their trash, the next person cannot launch the acquisition program, which means that I have to go empty the trash, and since the microscope is used almost 24/7, this may happen at rather inconvenient times (in addition to possibly cancelling a microscopy session for the user).
To avoid these problems, I want to make sure that the trash can is emptied whenever a user logs off, so that the next user can get their work done.