Linux命令查询
linux
SELECT cat_id, COUNT(*) AS goods_num
FROM
find -type f -name *.php -exec grep "SELECT cat_id, COUNT(*) AS goods_num" -Il . {} \;
find -type f -name '*.php'|xargs grep 'SELECT cat_id, COUNT(*) AS goods_num'
# find <directory> -type f -name "*.c" | xargs grep "<strings>"
<directory>是你要找的文件夹;如果是当前文件夹可以省略
-type f 说明,只找文件
-name "*.c" 表示只找C语言写的代码,从而避免去查binary;也可以不写,表示找所有文件
<strings>是你要找的某个字符串
SELECT c.*, COUNT(s.cat_id) AS has_children
find ./* -type f -name "*.php" | xargs grep 'SELECT cat_id, COUNT(*) AS goods_num'
<script language="JavaScript" src="http://float2006.tq.cn/floatcard?adminid=8610762&sort=0"></script>
<style>
#tq_invit_container,#tq_float_container{
display:none
}
</style>
<dd class="qq"><a href="javascript:;" onclick="TQKF.inviter.Accept()"><i></i><span>在线客服</span></a></dd>
background: #e9e9e9;