An incident responder has collected network capture logs in a text file, separated by five or more data fields. Which of the following is the BEST command to use if the responder would like to print the file (to terminal/screen) in numerical order?
C. sort –n
Explanation:
The sort -n command sorts the contents of the file numerically based on the first field or column of data. This is the appropriate option when you want to display a text file's contents in ascending numerical order.
Why the other answers are incorrect:
A. cat | tac: Displays the file in reverse order, but not numerically.
B. more: Displays the file page by page but does not sort the contents.
D. less: Similar to more, it allows scrolling through the file, but doesn’t sort the contents.
The answer is C, sort –n.
The sort command is used to sort lines of text in a file. The –n option specifies that the sort should be done numerically.
upvoted 1 times
...
Log in to ExamTopics
Sign in:
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.
044f354
1 month, 3 weeks agoWutan
1 year, 2 months ago