Delete files with string found in file - linux cli

I am trying to delete erroneous emails based on finding the email address in the file via Linux CLI.

I can get the files with

find . | xargs grep -l email@domain.com

But I cannot figure out how to delete them from there as the following code doesn't work.

rm -f | xargs find . | xargs grep -l email@domain.com

Спасибо за вашу помощь.

44
задан Spechal 25 December 2010 в 03:12
поделиться