Coders' Corner Search:
General :: Linux :: shell
Linux shell programming/ scripting, shortcuts and general know-how.

Articles:


Featured Article

Recursively delete all files matching a certain pattern

Question:

I need to delete all index.html files in a directory and all its subdirectories. How can I do this?

Answer:

Use find and pipe the output to rm:

find . -type f -name index* -exec rm {} \;