#> find . -type f -exec grep 'thename' -l {} \; grep -l :是显示匹配的内容的文件名字! 或者: #> find . -type f -name "*.*" |xargs grep 'thename' -l (这个方法 不好,挺乱的,还慢,推荐前一个方法!) 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/75258/showart_1106486.html
Linux 下的查找命令有好几个,我比较常用的就 whereis 和 find,这里和大家分享一下。 whereis 其中 whereis 主要用来查找命令文件、源代码和 man 帮助文件,使用也很简单,比如 //查找帮助文件 [wyg@server]# whereis -m php php: /usr/share/man/man1/php.1 //查找二进制文件,除了帮助文件外全列出来了 [wyg@server]# whereis -b php php: /usr/bin/php /etc/php.d /etc/php.ini /usr/include/php //查找源代码,啥都找不到...
本帖最后由 yingtank 于 2010-07-07 22:19 编辑 一,遇到find之前经常用的查找命令 which,whereis来查找安装的程序文件 [zhangy@BlackGhost ~]$ whereis php php: /usr/bin/php /etc/php /usr/lib/php /usr/include/php /usr/local/php /usr/share/man/man1/php.1.gz [zhangy@BlackGhost ~]$ which php /usr/bin/php locate来查找文件 [zhangy@BlackGhost ~]$ locate Test.php /home/zhangy/phpMyAdmin/test/FailTest.php...
Linux 下的查找命令有好几个,我比较常用的就 whereis 和 find,这里和大家分享一下。 whereis 其中 whereis 主要用来查找命令文件、源代码和 man 帮助文件,使用也很简单,比如 //查找帮助文件 [wyg@server]# whereis -m php php: /usr/share/man/man1/php.1 //查找二进制文件,除了帮助文件外全列出来了 [wyg@server]# whereis -b php php: /usr/bin/php /etc/php.d /etc/php.ini /usr/include/php //查找源代码,啥...
在LINUX下,我对APACHE的httpd.conf进行设置时,想问一下,有没有什么命令可以查找某个英文的。 就是WINDOWS下面,在记事本里的查找功能一样。 请各位高手教教我!
#> find . -type f -exec grep 'mingtian' -l {} \; grep -l :是显示匹配的内容的文件名字! 或者: #> find . -type f -name "*.*" |xargs grep 'xiaoshou' -l (这个方法 不好,挺乱的,还慢,推荐前一个方法!) 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/55630/showart_683312.html