LCP-001 Practice Test & Exam Dumps
Linux Certified Professional (LCP) Powered by LPI Questions 96–100 (page: 21)

Updated On: 19-Feb-2026

You have created a really long letter and after you are done, you notice that you used the name "Bob" many times but your forgot to capitalize it in many instances.
Which command would you replace "bob" with "Bob" in all instances and generate a new letter for printing?

  1. sed `/bob/Bob' letter > newletter
  2. sed s/bob/Bob/ letter < newletter
  3. sed `s/bob/Bob' letter > newletter
  4. sed `s/bob/Bob/g' letter > newletter
  5. sed s/bob, Bob/' letter > newletter

Answer(s): D



You are logged in as user tux1, but now you want to switch users to tux2 with tux2's environment.
How would you do this?

  1. su tux2
  2. su -e tux2
  3. su - tux2
  4. su -m tux2
  5. su -f tux2

Answer(s): C



You wish to kill a process with a PID of 123. Select the command which will allow the process to "clean up" before exiting.

  1. kill -1 123
  2. kill -9 123
  3. kill -15 123
  4. kill -17 123

Answer(s): C

Explanation:

To terminate the process we use kill command. But we should know the process ID. In Qs PID is specified to 123. Syntax of kill command is: kill signal PID Where -9 is the powerful signal then other signal which kill the process.



You have read/write permission on an ordinary file foo. You have just run ln foo bar.
What would happen if you ran rm foo?

  1. foo and bar would both be removed.
  2. foo would be removed while bar would remain accessible.
  3. foo would be removed. bar would still exist but would be unusable.
  4. Both foo and bar would remain accessible.
  5. You would be asked whether bar should be removed.

Answer(s): B



Which command will print line numbers before each line in a file?

  1. ln
  2. nl
  3. cat -n
  4. numline

Answer(s): B



Viewing page 21 of 60
Viewing questions 101 - 105 out of 289 questions


Post your Comments and Discuss GAQM LCP-001 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!