ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 242 - SY0-601 discussion

Report
Export

A web server log contains two million lines. A security analyst wants to obtain the next 500 lines starting from line 4,600. Which of the following commands will help the security analyst to achieve this objective?

A.
cat webserver.log | head -4600 | tail +500 |
Answers
A.
cat webserver.log | head -4600 | tail +500 |
B.
cat webserver.log | tail -1995400 | tail -500 |
Answers
B.
cat webserver.log | tail -1995400 | tail -500 |
C.
cat webserver.log | tail -4600 | head -500 |
Answers
C.
cat webserver.log | tail -4600 | head -500 |
D.
cat webserver.log | head -5100 | tail -500 |
Answers
D.
cat webserver.log | head -5100 | tail -500 |
Suggested answer: D

Explanation:

the cat command displays the contents of a file, the head command displays the first lines of a file, and the tail command displays the last lines of a file. To display a specific number of lines from a file, you can use a minus sign followed by a number as an option for head or tail. For example, head -10 will display the first 10 lines of a file.

To obtain the next 500 lines starting from line 4,600, you need to use both head and tail commands. https://www.professormesser.com/security-plus/sy0-601/sy0-601-video/file-manipulation-tools/

asked 02/10/2024
Juan Jose Montero Caletrio
30 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first