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

Updated On: 24-Feb-2026

You want to search the file myfile for all occurances of string containing at least five characters, where character number 2 and 5 are 'a' and character number 3 is NOT 'b'.
Which command would you use?

  1. grep a*^b*a myfile
  2. grep .a[^b].a myfile
  3. grep .[a].*.[a] myfile
  4. grep .a*^b..a myfile

Answer(s): B



What does the following command do? cat '$TEST'

  1. Displays a bash syntax error message.
  2. Displays the contents of the file named $TEST if it exists.
  3. Waits for the user to enter text and then echos the text back.
  4. Displays the contents of the file named inside the back quotes.
  5. Displays the contents of the named by the environment variable TEST.

Answer(s): B



You want to the command foo to take its input from the file foobar and send its output to the program bar.
Which of the following command lines will do this?

  1. foo < foobar | bar
  2. foo < foobar > bar
  3. foo | foobar > bar
  4. foo | bar < foobar
  5. foo > bar < foobar

Answer(s): A



Which of the following commands would display the lines containing capital letters form the file "turkey.txt"?

  1. cat turkey.txt|wc -|
  2. grep -n [A-Z] turkey.txt
  3. cat turkey.txt|wc -w [A-Z]
  4. grep -v [A-Z] < turkey.txt
  5. for [A-Z] in turkey.txt | count

Answer(s): B



In Bash, inserting "1>&2" after a command redirects

  1. standard error to standard input
  2. standard input to standard error
  3. standard output to standard error
  4. standard error to standard output
  5. standard output to standard input

Answer(s): C






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

Join the LCP-001 Discussion