例如,想要在当前文件夹下的多个.c或者.txt文件中查找“shutdown”字符串,

可以使用“grep shutdown ./*.c”或“grep shutdown ./*.txt”即可

使用find命令如下:find /test -type f -name "*.txt" -exec grep -l "shutdown" {} \;

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-30
  • 2022-12-23
猜你喜欢
  • 2021-06-12
  • 2022-12-23
  • 2021-09-25
  • 2021-05-17
  • 2021-10-02
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案