How to check the location of the target file in centos

王林
Release: 2020-04-04 09:49:24
Original
3898 people have browsed it

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"
Copy after login

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"
Copy after login

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"
Copy after login

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!