|
find命令:
------------------------------------------------------- [root@desktop3 labs]# ls -l
- total 0
- -rwxrw-r--. 1 root root 0 Aug 13 20:19 file1
- --wx-w-r--. 1 root root 0 Aug 13 20:20 file2
- -r--r---w-. 1 root root 0 Aug 13 20:20 file3
- -rwxrwxr--. 1 root root 0 Aug 13 20:21 file4
- -rwxrwx-w-. 1 root root 0 Aug 13 20:21 file5
复制代码 以上命令表示三科任何一科满足都行,其中7表示每科中(r,w,x)任何一个权限满足都行。
/代表两层“any”的含义,所以7代表“any”
-代表“all”,所以0代表“any”
- [root@desktop3 labs]# ls
- file1 file2 file3 file4 file5 file6 file7
- [root@desktop3 labs]# find ./ -perm -4000 -o -2000
- find: unknown predicate `-2000'
- [root@desktop3 labs]# find ./ -perm -4000 -o -perm -2000
- ./file6
- ./file7
- [root@desktop3 labs]# find ./ -perm -4000 -perm -2000
- [root@desktop3 labs]# find ./ -perm -4000 -o -perm -2000
- ./file6
- ./file7
- [root@desktop3 labs]# find ./ -perm 4000 -o -perm 2000
- [root@desktop3 labs]# find ./ -perm /4000 -o -perm /2000
- ./file6
- ./file7
- [root@desktop3 labs]# find ./ -perm -4000 -o -perm -2000
- ./file6
- ./file7
- [root@desktop3 labs]# find ./ -perm /4777 -o -perm /2777
- ./
- ./file1
- ./file2
- ./file3
- ./file4
- ./file5
- ./file6
- ./file7
- [root@desktop3 labs]#
复制代码- #
- # /etc/fstab
- # Created by anaconda on Fri Jun 28 17:51:42 2019
- #
- # Accessible filesystems, by reference, are maintained under '/dev/disk'
- # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
- #
- /dev/mapper/rhel-root / xfs defaults 0 0
- UUID=cae2eaaa-59ea-4c63-9c87-8e5358b6d9ac /boot xfs defaults 0 0
- /dev/mapper/rhel-swap swap swap defaults 0 0
- /dev/sdb2 swap swap defaults 0 0
- LABEL="ext4_label" /mnt ext4 defaults 0 0
- /root/swapfile swap swap defaults 0 0
- tmpfs /dev/shm tmpfs size=1200M 0 0
- ~
复制代码
|
|