find directory -name "name"
find directory -maxdepth N -name "name" -- root level 1
find directory -mindepth N -maxdepth M -name "name" --level between N and M
find directory -not -name "name" ---inverting
find . -mtime +10 --find modified files over 10 days
find . -mtime -10 --find modified files less than 10 days
find directory -empty -- find empty files
find directory -empty -exec rm -f {}
find . -size +100M --- find over 100M files
find . -size -100M --- find lower 100M files
find . -name '*.doc' -exec cp {} /directory \; ---- find doc files and copy to directory
find . -name '*.doc' -print0 | xargs -0 cp --target-directory=/destination ---- find doc files and copy to directory
find . -name '*.doc' -type f -delete
find . -name '*.doc' -print | xargs rm -f
find . -perm -g=r -type f -exec ls -l {}
find . -type f -exec ls -l {} \; | sort -n -r |head -5 ------- Finding the Top 5 Big Files
find . -type f -exec ls -l {} \; | sort -n | head -5 --------find the Top 5 small files
阅读(356) | 评论(0) | 转发(0) |