Which of these sets of entries does the following command return?
ldapsearch -x "(|(cn=marie) (!(telephoneNumber=9*)))"
A. Entries that don't have a cn of marie or don't have a telephoneNumber that begins with 9.
B. Entries that have a cn of marie or don't have a telephoneNumber beginning with 9.
C. Entries that have a cn of marie and a telephoneNumber that ending with 9.
D. Entries that don't have a cn of marie and don't have a telephoneNumber beginning with 9.
E. Entries that have a cn of marie or have a telephoneNumber beginning with 9.
题解
「ldapsearch」指令可以用来查找 LDAP 数据库中的数据。「-x」参数可以使用简单验证。最后一个参数可以加上筛选结果的脚本,「|」表示 OR,「!」表示 NOT,「9*」表示以一个「9」为开头,而且接下来会是任意数量的任意字符。串起来就是要过滤出「cn=marie」或是「telephoneNumber」不以 9 开头的数据。
所以答案是选项「B」。
