exam questions

Exam CS0-002 All Questions

View all questions & answers for the CS0-002 exam

Exam CS0-002 topic 1 question 48 discussion

Actual exam question from CompTIA's CS0-002
Question #: 48
Topic #: 1
[All CS0-002 Questions]

An organization recently discovered that spreadsheet files containing sensitive financial data were improperly stored on a web server. The management team wants to find out if any of these files were downloaded by public users accessing the server. The results should be written to a text file and should include the date, time, and IP address associated with any spreadsheet downloads. The web server's log file is named webserver.log, and the report file name should be accessreport.txt. Following is a sample of the web server's log file:

Which of the following commands should be run if an analyst only wants to include entries in which a spreadsheet was successfully downloaded?

  • A. more webserver.log | grep *.xls > accessreport.txt
  • B. more webserver.log > grep ג€*xlsג€ | egrep ג€"E 'success' > accessreport.txt
  • C. more webserver.log | grep ג€"E ג€return=200 | xlsג€ > accessreport.txt
  • D. more webserver.log | grep ג€"A *.xls < accessreport.txt
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
R00ted
Highly Voted 2 years, 7 months ago
Selected Answer: C
The answers should read: Options: A. more webserver.log | grep * xIs > accessreport.txt B. more webserver.log > grep ''xIs > egrep -E 'success' > accessreport.txt C. more webserver.log | grep ' -E ''return=200 | accessreport.txt D. more webserver.log | grep -A *.xIs < accessreport.txt
upvoted 21 times
2Fish
2 years, 1 month ago
Agree. I had to look at this for a bit. Thanks for deciphering that chicken scratch.
upvoted 7 times
...
...
JENNER_ROCKA
Highly Voted 3 years, 1 month ago
Selected Answer: C
The HTTP 200 OK success status response code indicates that the request has succeeded.
upvoted 8 times
...
zecomeia_007
Most Recent 9 months, 2 weeks ago
Selected Answer: C
grep 200
upvoted 1 times
...
[Removed]
2 years, 2 months ago
It is certainly C. However, the formatting is missing a few quotes. more webserver.log | grep "E return=200" | grep "\.xls" > accessreport.txt
upvoted 3 times
...
david124
2 years, 3 months ago
Selected Answer: C
C is correct
upvoted 2 times
...
ryanzou
2 years, 7 months ago
Selected Answer: C
C is correct
upvoted 2 times
...
jchutch2
2 years, 7 months ago
Selected Answer: C
It's absolutely C Tested
upvoted 1 times
...
Fastytop
2 years, 8 months ago
Selected Answer: C
is the correct answer
upvoted 2 times
...
EVE12
2 years, 8 months ago
Selected Answer: A
A is the correct one
upvoted 1 times
...
amateurguy
2 years, 8 months ago
Selected Answer: C
C is correct
upvoted 1 times
...
miabe
2 years, 9 months ago
Selected Answer: C
looks good to me
upvoted 1 times
...
Davar39
3 years ago
Selected Answer: C
Besides the 200 status code, answer C is the only syntax that makes sense.
upvoted 1 times
...
cysa_1127
3 years ago
Selected Answer: C
C is correct
upvoted 3 times
...
Xyz_40
3 years ago
C correct
upvoted 3 times
...
thegreatnivram
3 years ago
B is not also the proper answer because "success" is present on the log (as shown by the sample log), so althought the command is well structured, would not result succesuful downloads.
upvoted 1 times
...
thegreatnivram
3 years ago
HTTP 200 ok indicates success, but the command is not properly formulated, the third pipe "| xlsג€ > accessreport.txt" does not start with a valid command. No answer is valid here, but C would be closer.
upvoted 2 times
...
lionleo
3 years, 2 months ago
The answer is C 200 successful status
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago