4-3 Find File Search command in Linux

Source: Internet
Author: User

Find command

Command format: Find [Search Range] [search criteria]

#搜索文件使用

Example: Find/-name Install.log

#避免扩大搜素的范围, wasting system resources

#-name can only find the name of the file, need a fuzzy match, you can use wildcard characters, but the wildcard is a complete match

Linux wildcard characters

* Any Content

? Any one character

[] matches any one of the characters in parentheses

Note: in the process of using wildcards, "" must be added to prevent the system from identifying

-Find/root-iname Install.loG

#不区分大小写

-find/root-user Root

#按照所有者去搜索

-find/root-nouser

#查找没有所有者的文件

-find/var/log/-mtime +10

#查找10天前修改的文件

-10 files modified within 10 days

10 files modified on the 10th day

+10 files modified 10 days ago

Atime File access time

CTime changing file attribute time

Mtime Modifying file attribute time

-find. -size 20k

#按照文件大小搜索

-20k less than 20K

20k equals 25K

+20k Greater than 25K

4-3 Find File Search command in Linux

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.