首页 > 其他 > 详细

find实现特殊功能示例

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

# 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实现特殊功能示例

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!