作者:林泳_钿 | 来源:互联网 | 2023-05-17 13:37
IamtryingtodeleteerroneousemailsbasedonfindingtheemailaddressinthefileviaLinuxCLI.
I am trying to delete erroneous emails based on finding the email address in the file via Linux CLI.
我正在尝试删除错误的邮件,基于通过Linux CLI在文件中找到电子邮件地址。
I can get the files with
我可以把文件带来
find . | xargs grep -l email@domain.com
找到。| 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
xargs rm -f | xargs。| xargs grep -l email@domain.com
Thank you for your assistance.
谢谢你的帮助。
7 个解决方案