Linux command-- find
In linux, if we have too many files, it is not realistic to find them slowly, so we need to use search tools to search. Here is a search command: find
Basic syntax is used:
Find directory-name keyword-print
This command means to view a file with the keyword (which can be a directory or a file name) in a directory and output it to the screen!
Root@VM-12-155-debian:~# find /-name test-print/usr/src/linux-headers-4.9.0-kali3-amd64/include/config/usb/ehset/test/usr/src/linux-headers-4.9.0-kali3-amd64/include/config/test/usr/src/linux-headers-4.9.0-kali3-amd64/include/config/v4l/test
In addition, we can use-type to specify what to look for.
Root@VM-12-155-debian:~# find / var/www/-name index.html-type f-print/var/www/html/jaxsec/index.html/var/www/html/index.htmlroot@VM-12-155-debian:~# find / var/www/-name www-type d-print/var/www/root@VM-12-155Mutual DebianRank device file, Fmure-ordinary file, dmurt-catalog file, lmure-symbolic link file
This command is still a bit slow to find files, and the next command will introduce the command locate, which is also used to find files, but faster!