A file Search locate
Search faster by file name in background database locate file name//locate command searches the background database/var/lib/mlocate//updates the database updatedb
Two command search commands Whereis and which
Search for the path to the command and where the help document is located Whereis lswhereis-b only see the feasibility file Whereis-m find help files only
which
Three-File search find
Find [Search Range] [search criteria]find/-name Install.log//linux wildcard characters * matches any content? Match any one of the characters [] match any one of the characters in brackets//case insensitive Find/root-iname install.log//search Find/root-user root//by owner to find files without owners Find/root- nouser//Find Files Modified 10 days ago find/var/log/-mtime +10-10 10 within 10 10 days +10 10 days ago Atime file access time CTime change file properties mtime Modify file Contents// Find file size is 25kb file for find. -size 25k-25k less than 25kb file 25k equals 25kb file +25k greater than 25kb file//Find I node 262422 file find. -inum 262422
Find files larger than 20kb and less than 50kb in the/etc/directory find/etc-size +20k-a-size-50k-a and logic with two conditions are satisfied with the-O or logic or two conditions satisfy one can//find/etc/directory greater than 20kb less than 50KB, and show details find/etc-size +20k-a-size-50k-exec ls-lh{}\;-exec/-ok command {}\; Perform actions on search results
Search for eligible string grep in four files
You can use regular expressions to match
Match a qualifying string in a file grep [options] string file name option-I ignore case-V exclude specified string
"Linux Learning note four" file Search command