首页 > 代码库 > find实现特殊功能示例
find实现特殊功能示例
# 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实现特殊功能示例