Session Review

Session ID: 145
Mode: objective
Status: in_progress
Score: 0%

Filter: All | Incorrect | Flagged | Unanswered

Current filter: All

Back to Session

Question 1 (103.2-009 / multiple_choice)

Which command is known as the stream editor and can filter or transform text using patterns?

Status: Unanswered

Your Answer:

Options:

Explanation:
sed is the stream editor and can find matching strings using regular expressions as well as edit text streams [1].

Question 2 (103.2-018 / short_answer)

Which command displays the last 10 lines of a file by default?

Status: Unanswered

Your Answer:

Accepted Answer(s):
tail

Explanation:
tail displays the last 10 lines of a file by default [1].

Question 3 (103.2-024 / command_line)

Enter the command that counts how many processor lines are in /proc/cpuinfo using grep and wc.

Status: Unanswered

Your Answer:

Accepted Answer(s):
grep '^processor' /proc/cpuinfo | wc -l
grep processor /proc/cpuinfo | wc -l

Explanation:
A guided exercise asks to use grep and wc to display how many processors are present by counting processor lines in /proc/cpuinfo [1].

Question 4 (103.2-004 / multiple_choice)

Which command is described as a paginator that allows navigation and search through file contents?

Status: Unanswered

Your Answer:

Options:

Explanation:
less paginates the contents of a file and allows navigation and search functionality [1].

Question 5 (103.2-005 / multiple_choice)

Which command can count lines when used with the -l option?

Status: Unanswered

Your Answer:

Options:

Explanation:
wc can count characters, words and lines; with -l it prints the number of lines [1].

Question 6 (103.2-020 / short_answer)

Which command counts the number of lines in its input when used with the -l option?

Status: Unanswered

Your Answer:

Accepted Answer(s):
wc -l
wc

Explanation:
wc with the -l switch prints the number of lines of text read [1].

Question 7 (103.2-017 / short_answer)

Which command displays the first 10 lines of a file by default?

Status: Unanswered

Your Answer:

Accepted Answer(s):
head

Explanation:
head displays the first 10 lines of a file by default [1].

Question 8 (103.2-014 / multiple_choice)

Which command reads a bzip2-compressed text file to standard output?

Status: Unanswered

Your Answer:

Options:

Explanation:
bzcat allows processing or reading files compressed using the bzip2 method [1].

Question 9 (103.2-011 / multiple_choice)

Which command is used to display binary files in octal, decimal, or hexadecimal notation?

Status: Unanswered

Your Answer:

Options:

Explanation:
od, the octal dump command, displays a binary file in octal, decimal, or hexadecimal notation [1].

Question 10 (103.2-007 / multiple_choice)

Which command is used to list and count matching adjacent strings in sorted input?

Status: Unanswered

Your Answer:

Options:

Explanation:
uniq is used to list and count matching strings [1].