exam questions

Exam SY0-601 All Questions

View all questions & answers for the SY0-601 exam

Exam SY0-601 topic 1 question 432 discussion

Actual exam question from CompTIA's SY0-601
Question #: 432
Topic #: 1
[All SY0-601 Questions]

A security operations technician is searching the log named /var/messages for any events that were associated with a workstation with the IP address 10.1.1.1. Which of the following would provide this information?

  • A. cat /var/messages | grep 10.1.1.1
  • B. grep 10.1.1.1 | cat /var/messages
  • C. grep /var/messages | cat 10.1.1.1
  • D. cat 10.1.1.1 | grep /var/messages
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
[Removed]
Highly Voted 1 year, 9 months ago
Selected Answer: A
A. is indeed correct but if you don't want to look dumb just use grep command, cat is not needed : ' grep "10.1.1.1" /var/messages '
upvoted 9 times
...
mouettespaghetti
Highly Voted 2 years ago
A is correct The correct command to search the log named /var/messages for events associated with a workstation with the IP address 10.1.1.1 is: cat /var/messages | grep 10.1.1.1 Option A is the correct answer as it uses the cat command to display the contents of the /var/messages log file and pipes the output to the grep command, which searches for any lines that contain the IP address "10.1.1.1". This will show all log entries that contain that IP address. Option B is incorrect because the grep command should come before the cat command to search for the IP address in the log file. Option C is incorrect because the grep command should be used to search for the IP address, not the log file. Option D is incorrect because the cat command is used to display the contents of a file, not to search for information within it.
upvoted 5 times
...
buckthesystem
Most Recent 1 year, 6 months ago
I'm finding that CompTIA knows nothing about Linux. Probably just using whatever a quick Google search displays.
upvoted 3 times
...
ApplebeesWaiter1122
1 year, 12 months ago
Selected Answer: A
This command uses the cat command to display the contents of the /var/messages log file, and pipes the output to the grep command to search for the IP address 10.1.1.1. The grep command will then display any lines in the log file that contain the specified IP address.
upvoted 5 times
...
fouserd
2 years ago
Selected Answer: A
To search the log named /var/messages for any events that were associated with a workstation with the IP address 10.1.1.1, the security operations technician could use the command cat /var/messages | grep 10.1.1.1. This command uses the cat command to display the contents of the /var/messages file and pipes (|) the output to the grep command, which searches for lines containing the specified IP address.
upvoted 1 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