Find string and remove file

You can use this to find a string in a file and remove the file.
find . | xargs grep -l youemail@email.com | awk '{print "rm "$1}' > doit.sh
Look in file doit.sh for errors.
Execute the file:
bash doit.sh


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *