Home>Article>Operation and Maintenance> How to check the location of the target file in centos

How to check the location of the target file in centos

王林
王林 Original
2020-04-04 09:49:24 3887browse

How to check the location of the target file in centos

The method is as follows:

1. If we find all files in the root directory that contain the string "phpinfo", we can use the following command.

find / |xargs grep "phpinfo"

2. If we want to find all files containing the string "centos" in the current directory www directory, we can use the following command.

find www |xargs grep "centos"

3. If we want to find all files with the suffix .php containing the string "dgdxs.com" in the current directory www directory, we can use the following command.

find www -name "*.php" |xargs grep "centos"

4. If we want to find out if there is a http.conf file in the directory www. You can use the following command.

find -name http.conf

Recommended related tutorials:centos tutorial

The above is the detailed content of How to check the location of the target file in centos. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn