码迷,mamicode.com
首页 > 其他好文 > 详细

find实现特殊功能示例

时间:2017-06-18 23:31:18      阅读:212      评论:0      收藏:0      [点我收藏+]

标签:ati   delete   ora   int   exec   oca   示例   shell   -o   

# find /shell-script/
# find /shell-script/ -print
# find /shell-script/ -name "text*"
# find /shell-script/ -name "text*" -print
# find /shell-script/ -iname "text*" -print
# find /shell-script/ \( -name "text*" -o -name "c*" \) -print
# find /shell-script/ -path "*shell*" -print
# find . -regex ".*\(\.sh\|\.txt\)$"
# find . -iregex ".*\(\.sh\|\.txt\)$"
# find . ! -iregex ".*\(\.sh\|\.txt\)$"
# find /etc/ -maxdepth 2 -mindepth 2 -name "passwd" -print
# find /usr/local/ -type d -print
# find /usr/local/ -type f -print
# find /usr/ -type l -print
# find . -type f -atime -1 -print
# find . -type f -mtime 1 -print
# find . -type f -mtime +3 -print
# find . -type f -newer text1.txt -name "*.txt"
# find . -type f -size +2k
# find . -type f -newer text1.txt -name "*.txt" -delete
# find -type f -perm 777 -print
# find . -type f -user chavin -print
# find . -type f -user chavin -exec chown -R root:root {} \;
# find . -type f -user chavin -exec chown -R root:root {} +;
# find . \( -name "oracle*" -prune \) -o \( -type f -print \)

find实现特殊功能示例

标签:ati   delete   ora   int   exec   oca   示例   shell   -o   

原文地址:http://www.cnblogs.com/wcwen1990/p/7045695.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!