Question 120
A system administrator must search below /srv/invoice09 using case-insensitive file name as the condition. A review considers `find /srv/invoice09 -type f` as an alternative. Its relevant behavior is: This search uses -type f filters regular files; it does not filter by the extension of their names. The stated need is case-insensitive file name. That is a different result from the requested operation. Which listed command satisfies the original requirement without substituting this other behavior?
Explanation
Correct Answer
The -iname predicate matches file names with the pattern *.bak regardless of letter case. It matches the specified search condition at /srv/invoice09. This matches the stated requirement to search below /srv/invoice09 using case-insensitive file name as the condition. By contrast, the plausible alternative `find /srv/invoice09 -type f` has the effect: The -type f predicate selects regular files; it does not filter by the extension of their names. The stated need is case-insensitive file name; that operation would not achieve the requested result.
Incorrect Answers
The -name predicate matches the literal case in the glob *.bak, not alternate uppercase spellings. The stated need is case-insensitive file name. The stated task is to search below /srv/invoice09 using case-insensitive file name as the condition. Instead, `find /srv/invoice09 -iname "*.bak"` is the relevant alternative because the -iname predicate matches file names with the pattern *.bak regardless of letter case. It matches the specified search condition at /srv/invoice09.
The -type f predicate selects regular files; it does not filter by the extension of their names. The stated need is case-insensitive file name. The stated task is to search below /srv/invoice09 using case-insensitive file name as the condition. Instead, `find /srv/invoice09 -iname "*.bak"` is the relevant alternative because the -iname predicate matches file names with the pattern *.bak regardless of letter case. It matches the specified search condition at /srv/invoice09.
The -type d predicate selects directories, not matching files in the directory tree. The stated need is case-insensitive file name. The stated task is to search below /srv/invoice09 using case-insensitive file name as the condition. Instead, `find /srv/invoice09 -iname "*.bak"` is the relevant alternative because the -iname predicate matches file names with the pattern *.bak regardless of letter case. It matches the specified search condition at /srv/invoice09.






Red Hat Certified System Administrator (RHCSA) (EX200) Practice Tests