Find Command Usage Summary

Source: Internet
Author: User
Tags glob

Procedure for locating a qualifying file on a file system

File Lookup: Locate, find

Locate: A non-real-time lookup tool that relies on a pre-built index, and that the index is built automatically when the system is idle ( recurring task ) ; Manually update this database (updatedb) ; Find Fast; fuzzy search;

Find : Real-time search; search speed slightly slow; exact search;

Find command:

find [OPTION] ... [ Find path ] [ find condition ] [ processing Action ]

Find path: Default to the current path;

Search criteria: The specified search criteria, can be based on the file name, size, genus of the main group, type, etc., by default to find all the files under the specified path;

Handling actions: What to do with the eligible files; By default, output to the screen;

Find criteria

To find by file name:

-name " file name ": support for using Glob ;

*, ?, []

-iname " file name " : Character case insensitive, support for using Glob ;

-regex "PATTERN" : To PATTERN matches the entire file path string, not just the file name;

According to the genus, the genus Group looks for:

-user USERNAME: find files that belong to the specified user;

-group GROUPNAME:

-uid UserID: find the owner designation of a file UID of documents;

-gid GroupID:

-nouser: find files that are not owned by the master;

-nogroup : Find files that are not part of a group;

To find by file type:

-type type

F: Normal file

D: Catalogue

L: Symbolic Links

B: Block Devices

C: character Device

P: Named Pipes

S: Sockets

Combination Lookup criteria:

and Conditions: -A

or Condition: - o

Non-conditional: -not,!

! A-o! B =! (A-a B)

! A-a! B =! (A-o B)

Find command Usage summary

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.