Linux and Windows file search command

Linux

Query File name:

find / -name xx

To find whether the sentence Trojan:

grep -rn 'eval(' 路径
grep -rn --include=*.php 'eval(' 路径

Windows

Find the file name, windows similar to the linux find command: for / r

for /r C: %i in (*) do @echo %i
找出C盘下的所有文件,并将所有文件名都输出出来

Note that this one command:

for /r C: %i in (2222.txt) do @echo %i

At first glance, it is to find all 2222.txt the C disk file and output file name, but the result is not as we would like to find the file, does not actually exist, matching pattern in parentheses, if not with *, does not exactly match the file name, but the output of all the subdirectories mosaic pattern mosaic brackets content. So, in order to find () in at least have a * .txt can be placed last, because this is the * wildcard matches all characters, in general, create a .txt file, .txt later there will be no other character, so in order to accurately locate, in the back plus a * .txt are possible

Published 152 original articles · won praise 63 · views 60000 +

Guess you like

Origin blog.csdn.net/qq_41617034/article/details/105335774