Delete hidden files on unix

Peter Otten __peter__ at web.de
Mon Mar 3 07:04:12 EST 2008


loial wrote:

> How can I delete hidden files on unix with python, i.e I want to do
> equivalent of
> 
> rm  .lock*

>>> for fn in glob.glob(".lock*"):
...     os.remove(fn)
...

Peter



More information about the Python-list mailing list