Find File Lookup command

Source: Internet
Author: User

personally find command is very powerful file Lookup command, can be based on 1: FileName 2: File Type 3: file Time 4 : File size 5: Directory depth 6: Permissions 7: Regular Expression lookup 8: Find files owned by users and can do more with 9:exec

1: based on file name

Find Find directory-name look up content

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6E/BE/wKioL1WFh33QoleWAAA5HwbvJX4752.jpg "style=" float: none; "title=" Image.png "alt=" Wkiol1wfh33qolewaaa5hwbvjx4752.jpg "/>

2: based on file type

Find directory-type [d directory] [f file] [L link]

File type: the

F: File

L: Link

D: Catalogue

C: Character device

B: Block device

S: Socket

P:fifo

3: time-based lookup

Find directory-type F [-atime/-ctime/-mtime] [3 just three days ago visited/-3 3 days visited/+3 three days prior to access]

minute level corresponding to the number of days: amin/cmin/mmin

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6E/C2/wKiom1WFhcnip1DhAAA9o3yawDU084.jpg "title=" Image2.png "style=" Font-size:16px;float:none; "alt=" wkiom1wfhcnip1dhaaa9o3yawdu084.jpg "/>

Newer parameters:

Find directory-type f-newer reference file/Find all files updated with reference file modification time

4: search based on file size

Find directory-type f-size [+2k greater than 2k/ -2k less than 2k/2k equals 2k files]

5: Search by directory depth

-maxdepth n down search depth max n

-mindepth n down depth N to start search

6: Search by Permissions

Find search Directory-type f-perm 664//Search permission for 664 files

7: search with regular expressions

Find Search catalog-regex Regular expression content

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6E/BE/wKioL1WFh32Q9FYnAABqSnb-g-M717.jpg "title=" Image3.png "style=" Font-size:16px;float:none; "alt=" wkiol1wfh32q9fynaabqsnb-g-m717.jpg "/>

8: Find user-owned files

Find Search Catalog-user username

9: combined with-exec

Find matching content-exec command {} \;

Explanation: {} is a special string paired with-exec, and for each matching file, {} is replaced with the corresponding file name and manipulated by the command

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6E/C2/wKiom1WFhcnCl6rXAAC3KvfMRFo353.jpg "title=" Image4.png "style=" Font-size:16px;float:none; "alt=" wkiom1wfhcncl6rxaac3kvfmrfo353.jpg "/>

Ps:

1: Delete the Found content: add-delete to the last face

2: summary:-name-type-atime. -size-perm-regex-user

3:-iname/-iregex Ignoring case

4:! Name Direction operation

5:-o Continuous operation

Find Search catalog (Content-O content)


This article is from the "Call Me boxin" blog, so be sure to keep this source http://boxinknown.blog.51cto.com/10435935/1663910

Find File Lookup 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.