close

There is a nice command line one involving perl that you can automate.