LFCS

LFCS practice questions, page 9 of 11, with answer review and explanations.

Question 41

What command will generate a list of user names from /etc/passwd along with their login shell?

  1. column -s : 1,7 /etc/passwd
  2. chop -c 1,7 /etc/passwd
  3. colrm 1,7 /etc/passwd
  4. cut -d: -f1,7 /etc/passwd

Question 42

In a nested directory structure, which find command line option would be used to restrict the command to searching down a particular number of subdirectories?

  1. -dirmax
  2. -maxdepth
  3. -maxlevels
  4. -n
  5. -s

Question 43

Which of the following statements is correct regarding the command foo 1> bar?

  1. The stdout from the command foo is appended to the file bar.
  2. The stdout from the command foo overwrites the file bar.
  3. The command foo receives its stdin from the file bar.
  4. The command foo receives its stdin from the stdout of the command bar.
  5. The stderr from the command foo is saved to the file bar.

Question 44

Which of the following commands kills the process with the PID 123 but allows the process to "clean up" before exiting?

  1. kill -PIPE 123
  2. kill -KILL 123
  3. kill -STOP 123
  4. kill -TERM 123

Question 45

SIMULATION - Which signal is missing from the following command that is commonly used to instruct a daemon to reinitialize itself, including reading configuration files? killall -s _______ daemon