brayhan gutierrez cespedes
Quiz by , created more than 1 year ago

fdsfdfsfsdfdsfsdfsd

16
0
0
brayhan gutierrez cespedes
Created by brayhan gutierrez cespedes over 6 years ago
Close

8

Question 1 of 24

1

Error messages generated by commands are sent where by default?

Select one of the following:

  • Log files

  • STDOUT

  • STDERR

  • STDIN

Explanation

Question 2 of 24

1

A successful command will print output to STDOUT.

Select one of the following:

  • True
  • False

Explanation

Question 3 of 24

1

Which of the following commands will direct error messages to the file, error.log?

Select one of the following:

  • ls /root >> error.log

  • ls /root 2> error.log

  • ls /root $> error.log

  • ls /root > error.log

Explanation

Question 4 of 24

1

A pipe allows you to…

Select one of the following:

  • …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.

Explanation

Question 5 of 24

1

Channel 2 is:

Select one of the following:

  • STDIN

  • STDALL

  • STDOUT

  • STDERR

Explanation

Question 6 of 24

1

Which of the following commands will append its output to output.file?

Select one of the following:

  • echo Testing > output.file

  • echo Testing >> output.file

  • output.file < echo Testing

  • echo Testing -> output.file

Explanation

Question 7 of 24

1

Which command(s) can be used to sort the lines of list.file alphabetically and display it on the screen?

Select one or more of the following:

  • sort < list.file

  • cat list.file | sort

  • cat list.file >> sort

  • echo list.file > sort

Explanation

Question 8 of 24

1

Which option of the head command will display only the first five lines of a file?

Select one of the following:

  • -l 5

  • No option needed; head displays only five lines by default.

  • -n

  • -n 5

Explanation

Question 9 of 24

1

The grep command…

Select one of the following:

  • …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.

Explanation

Question 10 of 24

1

The grep command can be used with glob characters.

Select one of the following:

  • True
  • False

Explanation

Question 11 of 24

1

Which of the following commands will display only lines that begin with start?

Select one of the following:

  • grep *start file.txt

  • grep $start file.txt

  • grep start file.txt

  • grep ^start file.txt

Explanation

Question 12 of 24

1

Which of the following commands will display only lines that begin with test?

Select one of the following:

  • grep ^test file.txt

  • grep $test* file.txt

  • grep *test file.txt

  • grep &test file.txt

Explanation

Question 13 of 24

1

Which of the following commands will display lines that contain either start or end?

Select one of the following:

  • egrep start end file.txt

  • egrep ‘start|end’ file.txt

  • egrep start&end file.txt

  • egrep (start|end) file.txt

Explanation

Question 14 of 24

1

Which of the following commands can be used to scroll through a text file?

Select one or more of the following:

  • some

  • less

  • cat

  • more

Explanation

Question 15 of 24

1

The find command can search for files based on the size of the file.

Select one of the following:

  • True
  • False

Explanation

Question 16 of 24

1

Which of the following commands scans the file to determine file locations?

Select one of the following:

  • search

  • locate

  • where

  • find

Explanation

Question 17 of 24

1

Which option for the cut command is used to specify a delimiter?

Select one of the following:

  • -f

  • -d

  • =

  • -D

Explanation

Question 18 of 24

1

Which option for the cut command is used to specify the field?

Select one of the following:

  • -D

  • -f

  • -d

  • #

Explanation

Question 19 of 24

1

Which option for the wc command will print the number of lines in a file?

Select one of the following:

  • -l

  • -w

  • -C

  • -L

Explanation

Question 20 of 24

1

Which option for the wc command will print the total number of words in a file?

Select one of the following:

  • -l

  • -L

  • -C

  • -w

Explanation

Question 21 of 24

1

Which command can be used to print line numbers?

Select one of the following:

  • num

  • sort

  • ln

  • nl

Explanation

Question 22 of 24

1

The command echo “text” > file.txt will create file.txt if it does not already exist.

Select one of the following:

  • True
  • False

Explanation

Question 23 of 24

1

The command echo “text” > file.txt will not overwrite file.txt if it already exists.

Select one of the following:

  • True
  • False

Explanation

Question 24 of 24

1

The command echo “text” >> file.txt will not overwrite file.txt if it already exists.

Select one of the following:

  • True
  • False

Explanation