grep files based on time stamp

后端 未结 3 908
情歌与酒
情歌与酒 2021-02-04 13:13

This should be pretty simple, but I am not figuring it out. I have a large code base more than 4GB under Linux. A few header files and xml files are generated during build (usin

3条回答
  •  死守一世寂寞
    2021-02-04 14:04

    Use this. Because if find doesn't return a file, then grep will keep waiting for an input halting the script.

    find . -mtime 0 -type f | xargs grep "pattern"
    

提交回复
热议问题