Wednesday, August 4, 2010

How to remove file of same extension in one shell command?

Type the following command..
Syntax:
find -iname "pattern" -exec rm -rf {} \;

example:
here i am going to delete all the virus .exe files in one go..
find . -iname "*.exe" -exec rm -rf {} \;

Hurray no virus in the current folder.. :)