日期:2014-05-16  浏览次数:20688 次

求助,搜索文件
搜索aa文件夹中 前10行中包含"linux"字段的所有文件
这个shell命名该怎么写

find /home/aa/ | head -n 10 | xarge grep -l "linux"  这么写不对
linux? 搜索

------解决方案--------------------
for file in `find /home/aa/ -type f`; do
    head -n 10 $file 
------解决方案--------------------
 grep -q "linux" && echo $file
done