linux下查找文件

Posted zhaoxiaorui

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux下查找文件相关的知识,希望对你有一定的参考价值。

查询l文件名为test.txt的文件

find / -name test.txt

 

从根目录开始查找文件名为“.php”的文件,并找出包含“test”的行

find / -type f -name "*.php" | xargs grep "test"

 

在根目录下查找某个文件

find . -name "test"

以上是关于linux下查找文件的主要内容,如果未能解决你的问题,请参考以下文章