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」不以0開頭的資料。

所以答案是選項「B」。