Linux Common Commands 3

Source: Internet
Author: User

File Search Command

1.

Command name:Find

Command path:/bin/find

Execute Permissions: All Users

Syntax:find [ search Range ] [ match condition ]

Function Description: File search

File Search Type

    1. Search by file name

-name(file name is case-sensitive) -iname( case insensitive)

Wildcard: *(matches any character) ? (matches a single character)

2. Search by File size

The size of the data in Linux is represented as a database (1 data block 0.5k)

-size

+n greater than -n less than n equals

3. Search by Owner

Find/home-user YCW

4. Search by owning group

Find/home-group YCW

5. Search by Time attribute

-amin accessing time access

-cmin file attribute change

-mmin File Contents Modify

6. Search by file attributes

Find/etc-type f Find files in/etc

f------File

D-----Directory

L------Soft Connection

P-----Piping

C-----Character device files

b-----block device files

7. Connect with-a-o when there are multiple conditions

-a two conditions simultaneously satisfy

-O satisfies any one of two conditions

8. When you need to process the results of the search, use the-exec/-ok command {}\;

9.-inum based on I node lookup

Linux Common Commands 3

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.