Use of the Find command under Linux

Source: Internet
Author: User
File Lookup
#根据name查找find . -name excel2json.py#根据文件名后缀查找find . -name "*.py" -print#使用正则表达式查找find . -name ‘[A-Z,a-z,1-10]‘.py -print#排除某些文件find . -name "curl.py" -prune -o -name "*.py" -print
Directory Lookup
find . -path"./aa " -prune -o -name "*.txt" -printfind . -path"./aa " -prune -o -path "./bb" -prune -o -name "*.txt" -print
Permission Lookup
find . -prem 775 -print#不查找aa下的文件   find . -path "./aa" -prune -0 -perm 775 -printfind . -path "./aa" -prune -0 -path "./bb" -prune -o -perm 775 -printfind . \( -path "./aaa" -o -path "./bbb" \) -prune -o -perm 775 -print
Search by Owner
find / -user www -type f -print#查找属主被删除find / -nouser -type f -printfind / -group apache -type -f -print

Use of the Find command under Linux

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.