Home CompTIA CySA+ CS0-001 – Q. 344

CySA+ CS0-001 – Q. 344

0
116
⚠️ Retired / Legacy Exam: This exam has been retired or replaced. These practice questions are kept for reference only. Please check the official vendor website for current exam versions before studying.

An application contains the following log entries in a file named “authlog.log”:

A security analyst has been asked to parse the log file and print out all valid usernames. Which of the following achieves this task?

A. grep -e “successfully” authlog.log | awk ‘{print $2}’ | sed s/\’//g
B. cat authlog.log | grep “2016-01-01” | echo “valid username found: $2”
C. echo authlog.log > sed ‘s/User//’ | print “username exists: $User”
D. cat “authlog.log” | grep “User” | cut -F’ ‘ | echo “username exists: $1”

Cloud Tech
Cloud Tech is a small, independent team that writes free practice questions for Microsoft Azure, AWS and CompTIA certification exams. We write every question ourselves against the current official exam outline, explain why each option is right or wrong, link to the vendor's documentation, and update or archive sets when an exam changes. Spotted a mistake? Email [email protected].