I am looking for syntax I saw somewhere but can not find now. Working with the results of a find delete the files found.

The syntax is something like this:

for i in "${find . -name '*.ini'}"; do rm $i; done

Am I dreaming or is this possible?

Member Avatar

Instead of using for loop you can delete files by using

        find  . -name '*.ini' -exec rm '{}' \;    

Thanks ravi89. It'll do the trick. :)