In linux, the command whereis is often used to find files or content. <program name> Find the installation path of the software.-B only searches for binary files.-m only searches for help files.-s only searches for source code.-u exclusion specifies the type. file-f only displays file name-B <directory> searches for binary files under the specified directory-M <directory> searches for help files under the specified directory-S <directory> searches for files under the specified directory source code locate <File name> search file-d <database path> in the file index database search specified database updatedb Update file index database find [path] <expression> search file-name <expression> Search for a file by file name-iname <expression> Search for a file by file name, ignore case sensitivity-path <expression> Search for a file by path-ipath <expression> Search for a file by path, ignore case-sensitive files accessed in the past N minutes-atime <days> files accessed in the past N days-cmin <minutes> files modified in the past N minutes file-c Time <days> files modified in the past N days-anewer <reference files> files read later than the reference files-cnewer <reference files> files modified later than the reference files file-size <size> Search for files based on the file size, unit: B c w k M G-type <file type> Search for files based on the file type. Block B Device c character device d directory p MPs file f Common file l link s port file-user <user Name> search file by owner-uid <uid> search file by UID-group <Group Name> Search for files by group-gid <gid> Search for files by GID-empty search for empty Files Search for lines matching specified strings from the file content: $ grep "searched string" File Name: Find the row matching the regular expression from the file content: $ grep-e "Regular Expression" the file name is case insensitive: $ grep-I "searched string" name of the file to find matched lines: $ grep-c "searched string" name of the file to find lines that do not match the specified string from the file content: $ grep-v "searched string" the file name starts from the root directory and searches for all extensions. log, and find the line "find/-type f-name" * containing "ERROR "*. log "| xargs grep" E RROR "the system finds the httpd. conf file and displays the httpd. conf file on the screen. Find/-name "httpd. conf "-ls find a file in the root directory. -name "test" searches for the grep-r "zh_CN" file containing a string in a directory "./