Linux find command notes (refer to the third edition of laruence)

Source: Internet
Author: User


Linux find COMMAND notes (refer to the third edition of laruence) find [PATH] [option] [action] Or find path option [-exec COMMAND {}\; 1. time-related options: a total of-atime,-ctime is not-mtime, and the-mtime description-mtime n: n is a number, indicates the files whose content has been changed before "one day" n days ago; www.2cto.com-mtime + n: listed n days ago (not including n days) name of the file whose content has been changed;-mtime-n: name of the file whose content has been changed within n days (including n days. -Newer file: file is an existing file. It lists file names that are newer than file. Find/-mtime 0 0 indicates the names of two users or groups starting from now till 24 hours ago: -uid n: n is a number. This number is the user's guest account ID, that is, UID. This UID is a number recorded in/etc/passwd that does not correspond to the account name. -Gid n: n is also a number, which indicates that the group name id is the account name used by GID-user name: name-group name-nouser, -unfamiliar users of nogroup and www.2cto.com of the group 3. file name, File Attribute related-name filename: search file named filename-size [+-] number: size specification c Represents byte, k Represents 1024 bytes-type: search for files of the common file type f, device B and c, Directory d, socket is the c-perm mode permission to search for files 4 additional actions available www.2cto.com-print: print the searched structure to the current screen-exec do: This do is the command you want to execute. For example, you can determine the file type operation after setting the name to the world Folder: find/-name "world"-type d-exec file {}\; Structure:/tmp/world: in directory {}, find/-name "world"-type d-exec till \; is a keyword, which indicates that find starts (-exec) to end (\;)
 

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.