Find usage of the Linux file Lookup command

Source: Internet
Author: User

Linux file System file Lookup command: Locate,find

Locate features:

Non-real-time lookup: Search by index (quick to find, non-precise, fuzzy Lookup)

Find Features:

Real-time lookup: Traverse all files for conditional matching (precision lookup, slow)

find is a common command for production environments

usage : Find [options] [Find path] [find condition] [processing action]

Search criteria:

Search by file name:

Support using wildcard word such as: *,? , [],[^] and other

-name "File name":

-iname "file name": Ignore character case when searching

-user: According to the owner of the file to find

-group Drpname: Search According to the genus Group of the file

Combination Criteria Lookup:

With:-A, must satisfy both

Or:-O, meet one

Non:-not,! , the condition takes the reverse

Find by File type:

-type

F: Normal file L: Symbolic link C: Character device

D: Directory file B: Block device s: Socket file P: Named pipe

Find by File Size:

-size

Common units: K,m,g

Find by Time stamp:

-atime

In "Days" units,"minutes" units

Search by permissions:

-perm

Handling actions:

-print: Default processing action, display

-ls: Similar to Ls-l

-exec command {} \;

-ok command {} \;


Find usage of the Linux file Lookup command

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.