
Linux Essentials 2.21 - Working with Text M10 Exam
Authored by rehan myccsecurity
Information Technology (IT)
12th Grade

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
23 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Error messages generated by commands are sent where by default?
STDERR
STDIN
STDOUT
Log files
Answer explanation
By default, error messages generated by commands are sent to STDERR (standard error). This is a separate output stream from STDOUT (standard output), which is used for regular output.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A successful command may, or may not, print output to STDOUT. True or False?
True
False
Answer explanation
True. A successful command can execute without producing output to STDOUT, depending on its purpose. For example, commands that modify files or settings may not need to display any output.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following commands will direct error messages to the file error.log?
ls /root > error.log
ls /root >> error.log
ls /root $> error.log
ls /root 2> error.log
Answer explanation
The command 'ls /root 2> error.log' redirects error messages (file descriptor 2) to the file error.log. The other options either redirect standard output or are incorrectly formatted.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A pipe allows you to…
Send the output of a command to a file.
Type multiple commands at one prompt.
Send the same input to multiple commands.
Send the output of one command to another.
Answer explanation
A pipe is used in command-line interfaces to send the output of one command directly as input to another command, allowing for efficient data processing and manipulation.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Channel 2 is:
STDIN
STDALL
STDERR
STDOUT
Answer explanation
Channel 2 refers to STDERR, which is the standard error output stream used for error messages. STDIN is for input, STDOUT is for standard output, and STDALL is not a standard stream.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following commands will append its output to output.file?
echo Testing > output.file
echo Testing >> output.file
echo Testing -> output.file
output.file < echo Testing
Answer explanation
The command 'echo Testing >> output.file' appends the output of 'echo Testing' to 'output.file'. The '>>' operator is specifically used for appending, while '>' overwrites the file, making the second option the correct choice.
7.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Which command(s) can be used to sort the lines of list.file alphabetically and display them? (Choose two)
cat list.file | sort
echo list.file > sort
cat list.file >> sort
sort < list.file
Answer explanation
The commands 'cat list.file | sort' and 'sort < list.file' both read the contents of 'list.file' and sort them alphabetically. The other options do not sort or display the file contents correctly.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?