Home >Operation and Maintenance >CentOS >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!