|
发表于 2005-11-1 02:12:21
|
显示全部楼层
Post by cheyo
比如我要搜索/test目录下的所有2005-01-01到2005-02-01这段时间内的文件中,
哪些文件包含"abc"字段如何写find??
3Q
you can try something like:
- grep "abc" $(find \! -mtime +days -a -mtime +days)
复制代码
the code means grep "abc" from the result of the find, which searches from files modified not older than +days (the first time contrain) but older than +days (the second time constrain). For instance, 1.1.2005 is 330 days ago and 2.1.2005 is 300 days ago, then this command can be like- grep "abc" $(find \! -mtime +329 -a -mtime +299)
复制代码 |
|