[root@station60 ~]# ./1.sh
Pls input what do want to find?: a.txt
[root@station60 ~]# vi 1.sh
[root@station60 ~]# ./1.sh
Pls input what do want to find?: a.txt
/root/a.txt
在man find的时候,搜索-i.../\-i
找到了-inum,举个例子:
find / -inum 51620756
复制代码
RH124 P355:
find / -user root -group mail 2>/dev/null
复制代码
与下面这条命令等价:
find / -user root -a -group mail 2>/dev/null
复制代码
一个相对复杂的例子:
find / \( ! -user root -a -group mail \) -o \( -perm 1777 -a -type d \) 2>/dev/null
find: warning: you have specified the -maxdepth option after a non-option argument -iname, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments.