I. De Morgan Law
Non (A and B) = (not a) or (not B)
Non (A or B) = (not a) and (not B)
1. De Morgan Law really makes people headache, the following for everyone specific
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/85/EF/wKiom1ev4O2jRqdwAAAmt-g2BBY621.png "title=" Hc3gi ( 00jaq$64@9ardrw26.png "alt=" Wkiom1ev4o2jrqdwaaamt-g2bby621.png "/>
From the picture
a=1+2; b=2+3; c=4
Non-a=3+4
Non-b=1+4
A and B are both A and B at the same time, so a and b=2
A or B can be either A or B, so a or b=1+2+3
So not (A and B) =1+3+4 (not a) or (not B) =3+4+1
Not (A and B) = (not a) or (not B)
In the same vein, non (A or B) = (not a) and (not B)
(2) in Linux, the combined condition is
With:-A
Or:-O
Non:-not,!
De Morgan Law is:
! A-a! B =! (A-o B)
! A-o! B =! (A-a B)
Instance:
Look for the last week in the/var directory where its content has been modified and is not the root of the master, nor is it a postfix file
[Email protected] bin]# find/var-mtime-7-not \ (-user root-o-user postfix \) or [[email protected] bin]# find/var-m Time-7-not-user root-a-not-user postfix
Two. Operation:
1. Find the main root of the/var directory and all files belonging to the group Mail
[Email protected] bin]# find/var-user root-group Mail
2. Find all files in/var directory that do not belong to root, LP, GDM
[[email protected] bin]# find/var-not \ (-user root-o-user lp-o-user GDM \)-ls
3, find in the/var directory in the last week of its content has been modified, and the owner is not root, nor postfix files
[[email protected] bin]# find/var-mtime-7-not \ (-user root-o-user postfix \)
4. Find files that are not owned by the master or group on the current system and have been visited in the last week
[Email protected] bin]# Find/-nouser-nogroup-atime-7-ls
5. Find all files that are larger than 1M in the/etc directory and are of normal file type
[Email protected] bin]# find/etc-size +1m-type f-ls
6. Find files with no write permission for all users in/etc directory
[Email protected] bin]# find/etc/-not-perm/222-ls
7. Find at least one class of users who do not have permission to execute files in/etc directory
[Email protected] bin]# find/etc/-not-perm-111-ls
8, find/etc/init.d directory, all users have execute permission, and other users have write permission files
[Email protected] bin]# find/etc/init.d/-perm-113
This article from "zhang1003995416" blog, declined reprint!
The De Morgan law is detailed