Linux LPI 117-101 # 7 Of 9

60 Questions | Total Attempts: 83

SettingsSettingsSettings
Linux Quizzes & Trivia

Linux lpi testing


Questions and Answers
  • 1. 
    Which of the following syslog identifiers represents the highest priority?
    • A. 

      Notice

    • B. 

      Warning

    • C. 

      Error

    • D. 

      Critical

  • 2. 
    Which of the following syslog identifiers represents the highest priority?
    • A. 

      Alert

    • B. 

      Error

    • C. 

      Critical

    • D. 

      Emerg

  • 3. 
    Which of the following syslog identifiers represents the highest priority?
    • A. 

      Info

    • B. 

      Warning

    • C. 

      Notice

  • 4. 
    Which of the following syslog identifiers represents the highest priority?
    • A. 

      Alert

    • B. 

      Error

    • C. 

      Critical

    • D. 

      Emerg

  • 5. 
    You run the following commands:           [[email protected]]$ nice -n 1 program1           [[email protected]]$ nice -n 5 program2           [[email protected]]$ nice -n 10 program3           Which of the program started will have the highest priority?
    • A. 

      Program1

    • B. 

      Program2

    • C. 

      Program3

  • 6. 
     You run following commands:           [[email protected]]$ nice -n 1 program1           [[email protected]]$ nice -n 5 program2           [[email protected]]$ nice -n 10 program3           Which of the program started will have the highest priority?
    • A. 

      Program 1

    • B. 

      Program 2

    • C. 

      Program 3

  • 7. 
     Which two programs will allow you to change the priority of a program already running?(Choose two)
    • A. 

      Top

    • B. 

      Nice

    • C. 

      Niceit

    • D. 

      Renice

    • E. 

      Chnice

  • 8. 
    Which command would you use to change the priority of a running process?
    • A. 

      Renice

    • B. 

      Nice

    • C. 

      Kill

    • D. 

      Pstree

    • E. 

      Killall

  • 9. 
    To change the priority of a running process, you use the _____ command. (Specifycommand only with no options)
  • 10. 
    What program would you use to increase or decrease the priority of a commandbefore it is executed?
  • 11. 
    What command could be used to get a hierarchical view of all the processes runningon the system without requiring your to provide any switches or options?
  • 12. 
    You have created a really long letter and after you are done you notice that youused the name "Bob" many times but you forgot to capitalize it in many instances.Which command would replace "bob" with "Bob" in all instances and generate anew letter for printing?
    • A. 

      Sed '/bob/Bob' letter > newletter

    • B. 

      Sed s/bob/Bob/ leter < newletter

    • C. 

      Sed 's/bob/Bob/' letter> newletter

    • D. 

      Sed 's/bob, Bob/' letter > newletter

  • 13. 
    A user needs to search a file for lines that contain the asterisk (*) character. Whichgrep search command will accomplish this? Choose all that apply.
    • A. 

      Grep \* textfile

    • B. 

      Grep '*' textfile

    • C. 

      Grep "*" textfile

    • D. 

      Grep \ textfile

    • E. 

      Grep "'*'" textfile

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

      Grep a*^b*a myfile

    • B. 

      Grep .a[^b].a myfile

    • C. 

      Grep .[a].*.[a] myfile

    • D. 

      Grep .a*^b..a myfile

  • 15. 
    Which of the following commands would display the lines containing capital lettersform the file "turkey.txt"?
    • A. 

      Cat turkey.txt|wc -|

    • B. 

      Grep -n [A-Z] turkey.txt

    • C. 

      Cat turkey.txt|wc -w [A-Z]

    • D. 

      Grep -v [A-Z] < turkey.txt

    • E. 

      For [A-Z] in turkey.txt | count

  • 16. 
    You wish to list all files within your current working directory that are of the typeASCII, showing just a single line for each of those files. Type in the command stringthat would accomplish this.
  • 17. 
    You are writing text in vi. Now you want to save your changes and exit.Which two sequence of inputs will accomplish this? Select two.
    • A. 

      Esc XX

    • B. 

      Ctrl :w!

    • C. 

      Esc zz

    • D. 

      Esc :wq!

    • E. 

      Esc ZZ

  • 18. 
    You want to save vi changes to the file myfile with :w!, but vi complains it can notwrite to the file. Therefore, you want to check the write permissions on the file. Todo this without leaving vi, you type:
    • A. 

      :!ls -l myfile

    • B. 

      :\ls -l myfile

    • C. 

      Esc :ls -l myfile

    • D. 

      :?ls -l myfile

  • 19. 
    You wish to match instances of the word 'Many' that are at the begining of a line inthe vi editor. What is the key combination to do this? Include the character toindicate a search in VI, and type the command as if you were in Command Mode inVI.
  • 20. 
    You wish to match the character string v2.1 v2.2 v2.3 through to v2.9 within VI.Type the search string to achieve this.
  • 21. 
    How can you print an entire file to standard output?
    • A. 

      Printfile

    • B. 

      Cat

    • C. 

      Ls

    • D. 

      Pr2stdout

  • 22. 
    Select all the ways of exiting and saving a vi session.
    • A. 

      :wq

    • B. 

      :w

    • C. 

      :ZZ

    • D. 

      Shift ZZ

    • E. 

      :x

  • 23. 
    After starting vi to edit an existing text file, you press 'A' (shift +a). This will let you:
    • A. 

      Insert text at the end of the current file.

    • B. 

      Insert text at the end of the current sentence.

    • C. 

      Insert text after your current cursor position.

    • D. 

      Insert text at the end of the file.

    • E. 

      Insert text at the end of your current paragraph.

  • 24. 
    Type in the VI command line that would open the file mytestfile.txt and line numberit?
  • 25. 
    You wish to edit the file 'mytextfile' with the VI editor and search for the string' Certkiller '. Type in the command line to open the file and highlight the first instanceof Certkiller , (and any others).
Back to Top Back to top