Linux - Intro- multichoice questions

The ls command is used to list directory contents. Use the ls --help command and the below sample invocations to answer the next 4 questions.

myuser@localhost:~$ touch --help
Usage: touch [OPTION]... FILE...
...
myuser@localhost:~$ ls /etc
debian_version      host.conf           lsb-release
…
myuser@localhost:~$ lss /etc
-bash: lss: command not found
myuser@localhost:~$ ls -z /etc
ls: invalid option -- 'z'
Try 'ls --help' for more information.

Question 1

Which best describes why myuser got the "command not found" error message when running lss /etc?

Question 2

Which best describes why myuser got the "invalid option" error message when running touch ls -z /etc?

Question 3

When myuser ran the command ls /etc, what best describes the role of the word /etc?

Question 4

Which of the following would be a legitimate invocation of the ls command?

Question 5

Which control sequence causes bash to clear the screen?

Question 6

Which command will list the contents of the directory report recursively?

Question 7

Which of the following is an absolute directory reference?

Question 8

Which of the following is a relative directory reference?

Question 9

Which of the following could have been displayed by pwd?

Question 10

Following the command cd ~, which is the most likely result from pwd?

Question 11

The file named.conf is a system configuration file. This file belongs in

Question 12

The file e2fsck is a privileged command that must always be available to the system and being used by the system admin. This file would be found in

Question 13

Which of the following commands could not be used to create a file in /tmp?

Question 14

Use the file command to help answer the question.

What type of file is /dev/log?

Question 15

Which of the following commands would display the first 5 lines of the file /etc/passwd?

Question 16

What type of file is /usr/bin/md5sum?

Question 17

Given the path /home/username/secret.txt, choose the correct sentence: