Search for linux files or files

Source: Internet
Author: User
Search whereis & lt; program name & gt; for linux files or files; www.2cto.com find the installation path of the software-B only find the binary file-m only find the help file-s only find the source code-u exclude the specified type of files-f only show the file name-B & lt; directory & gt; query under the specified directory... search whereis for linux files or files <程序名称> Www.2cto.com find the installation path of the software-B only find the binary file-m only find the help file-s only find the source code-u exclude the specified type of files-f only show the file name-B <目录> Find the binary file-M in the specified directory <目录> Find the help file-S in the specified directory <目录> Find the source code www.2cto.com locate in the specified directory <文件名称> Search for file-d in the file index database <数据库路径> Search for the specified database updatedb to update the file index database find [path] <表达式> Search for file-name <表达式> Search for file-iname by file name <表达式> Search for files by file name, ignore case-path <表达式> Search for a file by path-ipath <表达式> Find files by PATH, ignore case-amin <分钟> Atime files accessed in the past N minutes <天数> Files accessed in the past N days-cmin <分钟> File modified in the past N minutes-ctime <天数> Files modified in the past N days-anewer <参照文件> Files read later than the reference file-cnewer <参照文件> File modified later than the reference file-size <大小> Search for a file based on the file size. the unit is B c w k M G-type. <文件类型> Search for a file based on the file type. Block B device c character device d Directory
P pipeline file f common file l link s Port file-user <用户名> Search for file-uid by owner user Search for file-group by UID <群组名> Search for file-gid by group Search for files by GID-empty search for empty files search for rows matching the specified string from the file content: $ grep "searched string" file name search for rows matching the regular expression from the file content: $ grep-e the "regular expression" file name is case-insensitive when searching: $ grep-I "searched string" the file name looks up the number of matched lines: $ grep-c "searched string" file name searches for 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" ERROR ": the system finds httpd. after the conf file, httpd is displayed on the screen. conf file information. 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 ". /it can be output to the file grep-r "zh_CN"> find.txt
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.