Pregunta 1
Pregunta
Error messages generated by commands are sent where by default?
Respuesta
-
Log files
-
STDOUT
-
STDERR
-
STDIN
Pregunta 2
Pregunta
A successful command will print output to STDOUT.
Pregunta 3
Pregunta
Which of the following commands will direct error messages to the file, error.log?
Respuesta
-
ls /root >> error.log
-
ls /root 2> error.log
-
ls /root $> error.log
-
ls /root > error.log
Pregunta 4
Pregunta
A pipe allows you to…
Respuesta
-
…send the same input to multiple commands.
-
…type multiple commands at one prompt.
-
…send the output of one command to another.
-
…send the output of a command to a file.
Pregunta 5
Respuesta
-
STDIN
-
STDALL
-
STDOUT
-
STDERR
Pregunta 6
Pregunta
Which of the following commands will append its output to output.file?
Respuesta
-
echo Testing > output.file
-
echo Testing >> output.file
-
output.file < echo Testing
-
echo Testing -> output.file
Pregunta 7
Pregunta
Which command(s) can be used to sort the lines of list.file alphabetically and display it on the screen?
Respuesta
-
sort < list.file
-
cat list.file | sort
-
cat list.file >> sort
-
echo list.file > sort
Pregunta 8
Pregunta
Which option of the head command will display only the first five lines of a file?
Pregunta 9
Pregunta
The grep command…
Respuesta
-
…will display all the lines that begin with the specified Regular Expression.
-
…is not case sensitive.
-
…will display all the lines in a file containing the specified Regular Expression.
-
…will display the line numbers in a file that contain a specified Regular Expression.
Pregunta 10
Pregunta
The grep command can be used with glob characters.
Pregunta 11
Pregunta
Which of the following commands will display only lines that begin with start?
Respuesta
-
grep *start file.txt
-
grep $start file.txt
-
grep start file.txt
-
grep ^start file.txt
Pregunta 12
Pregunta
Which of the following commands will display only lines that begin with test?
Respuesta
-
grep ^test file.txt
-
grep $test* file.txt
-
grep *test file.txt
-
grep &test file.txt
Pregunta 13
Pregunta
Which of the following commands will display lines that contain either start or end?
Pregunta 14
Pregunta
Which of the following commands can be used to scroll through a text file?
Pregunta 15
Pregunta
The find command can search for files based on the size of the file.
Pregunta 16
Pregunta
Which of the following commands scans the file to determine file locations?
Pregunta 17
Pregunta
Which option for the cut command is used to specify a delimiter?
Pregunta 18
Pregunta
Which option for the cut command is used to specify the field?
Pregunta 19
Pregunta
Which option for the wc command will print the number of lines in a file?
Pregunta 20
Pregunta
Which option for the wc command will print the total number of words in a file?
Pregunta 21
Pregunta
Which command can be used to print line numbers?
Pregunta 22
Pregunta
The command echo “text” > file.txt will create file.txt if it does not already exist.
Pregunta 23
Pregunta
The command echo “text” > file.txt will not overwrite file.txt if it already exists.
Pregunta 24
Pregunta
The command echo “text” >> file.txt will not overwrite file.txt if it already exists.