Linux command--File Search command

Source: Internet
Author: User

Linux command--File Search command

File Search command: Find

Command path:/bin/find

Execute permissions: Find " search scope " " Match condition "

Function Description: File search

$find/etc-name init??? (equivalent to fuzzy search *init* * matches any character?) Match a single character)

Find file init in directory/etc

      -iname Case insensitive

$find/-size +204800

Find files larger than 100M in the root directory

      +n greater than-n less than n equals

$find/home-user Shenchao

Find files with owner Shenchao under the root directory

      -group based on the owning group

$find/etc-cmin-5

Find files and directories for properties that have been modified within 5 minutes under/etc

      -amin Accessing Time Access

      -cmin file attribute Change

      -mmin File Contents Modify

$find/etc-size +163840-a-size-204800

Find files larger than 80MB and less than 100MB in/etc

      -a two conditions simultaneously satisfy

      -O Two conditions any one satisfies

$find/etc-name inittab-exec ls-l {} \;

Find the Inittab file in/etc and display its details

      -exec/-ok command {} \; action on search results

-type Search by file type

F File d directory l soft link file

-inum based on I-node lookup

Find-inum 31531-exec rm {} \;

Find-inum 31531-ok rm {} \;

Linux command--File Search 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.