1.查找 /tmp 目录下名字为 aming开头的所有文件。
[root@localhost ~]# find /tmp -name "aming*"
[root@localhost ~]#
2.搜索tmp目录下所属组group1,所属主user1的文件
[root@localhost ~]# find /tmp -group group1
[root@localhost ~]# find /tmp -user user1
[root@localhost ~]#
3.搜索根目录下的 1.txt 2.txt 和 a 目录
[root@localhost ~]# find / -path "/1.txt"
/1.txt
[root@localhost ~]# find / -path "/2.txt"
/2.txt
[root@localhost ~]# find / -path "/a"
/a
[root@localhost ~]#
4.搜索tmp目录下以 a 开头并且以 c 结尾的文件
[root@localhost tmp]# cd ~
[root@localhost ~]# find /tmp -name "a*c"
/tmp/aeuhgc
/tmp/abc
/tmp/abdc
[root@localhost ~]#
5.搜索 tmp 目录下,不是以 a 开头,并且大小超过100M的文件
[root@localhost ~]# find /tmp -not -name "a*" -a -size +100M
[root@localhost ~]#
[root@localhost ~]# find /tmp -not -name "a*" -a -size -100M
/tmp
/tmp/.X11-unix
/tmp/.X11-unix/X1024
/tmp/.X11-unix/X1025
/tmp/.X11-unix/X0
/tmp/.X11-unix/X1
/tmp/.ICE-unix
/tmp/.ICE-unix/1635
/tmp/.ICE-unix/2362
/tmp/.XIM-unix
/tmp/.font-unix
/tmp/.X1024-lock
/tmp/good
/tmp/.X0-lock
/tmp/.X1-lock
/tmp/.X1025-lock
/tmp/md
[root@localhost ~]#