GAQM LCP-001 Exam Questions
Linux Certified Professional (LCP) Powered by LPI (Page 11 )

Updated On: 24-Feb-2026

Which command will print to standard out only the lines that do not begin with # (pound symbol) in the file foobar?

  1. /bin/grep ^# foobar
  2. /bin/grep -v ^# foobar
  3. /bin/grep #$ foobar
  4. /bin/grep -v #$ foobar

Answer(s): B



What command will remove duplicate lines from a sorted file?

  1. filter
  2. trim
  3. uniq
  4. wc

Answer(s): C

Explanation:

uniq - remove duplicate lines from a sorted file



Which command line option would you use to restrict the GNU find command to searching a particular number of subdirectories?

  1. --max-dirs
  2. -dirmax
  3. -maxdepth
  4. -s
  5. -n

Answer(s): C



What is the disadvantage of using the command kill -9 ?

  1. A core dump file will be created.
  2. It affects the entire process group.
  3. It makes excessive use of system resources.
  4. The action can be blocked by buggy or malicious processes.
  5. The affected process is unable to clean up before exiting.

Answer(s): E



To prevent a command run as root from sending both standard out (stdout) and standard error (stderr) to any terminal or other file or device, which of the following strings should be appended to the command?

  1. >/dev/null
  2. >/dev/null 1>&2
  3. >/dev/null 2>&1
  4. 1>&2 >/dev/null
  5. 2>&1 >/dev/null

Answer(s): C






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

Join the LCP-001 Discussion