Delete files by extension

To recursively delete all files with a given extension (eg all .pyc files in a django application), use :

find . -name "*.pyc" -exec rm '{}' ';'

Change the “*.pyc” part to delete different file types.



No Responses to “Delete files by extension”  

Leave a Reply