Script in python to kill process by date

view full story

http://www.unix.com – Hello everyone, First sorry for my english. I'm new in python and I want to create a script that allows the cleaning of a directory (/ tmp), files corresponds to a specific process according to the date. Steps: 1 - I have to find all processes of a program running, eg OpenOffice, belonging to a User, by determining the date /start time of the oldest of them. 2 - Then delete all files (or directories) in "/ tmp" belonging to the the oldest Openoffice processes (the date determined in step 1) I want to get ideas or functions to use for this script in linux (RedHat) and python (HowTos)