Linux command--find

Source: Internet
Author: User

  1. Command format:

    Find [Find Range] [options] [parameters]

  2. Command function:

    Find a file or directory

  3. Command options:

    -name Search by name, allow wildcard "*" and "?" to be used

    -size Search by size, generally with "+" and "-" set more than or less than the specified size as the search criteria, units are K, M, G

    -type Search by type

    F Common Files

    Catalog D

    B-Block device files

    C-Character device files

    -user According to the file owner lookup, user plus space username

    -amin-n Find system last N minutes access to files

    -atime-n Find the last n days the system accessed the file

    -cmin-n Find system last N minutes change file status file

    -ctime-n Find system last N days change file status file

    -mmin-n Find system last n minutes files changed file data

    -mtime-n Find the last n days of the system changed file data file

  4. Common examples:

    Example one: Look for a file named pwd under the root

    Command: Find/-name "pwd"

    Example two: Finding a normal file under the current host

    Command: find ~/-type f

    Example three: Find a file with permission 777 in the current directory

    Command: find.-perm 777

    Example four: Find the file under/root for the last 10 minutes of system access

    Command: find/root-cmin-10

    Example five: Find files larger than 1024kb in/boot

    Command: find/boot-size +1024k or find/boot-size +1m

This article is from the "Shiyu" blog, make sure to keep this source http://928004321.blog.51cto.com/10707688/1731319

Linux command--find

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.