O'Reilly logo

LPI Linux Certification in a Nutshell, 3rd Edition by James Stanger, Bruno Gomes Pessanha, Stephen Addison Schneiter, Adam Haeder

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Questions

  1. What environment variable holds the list of all directories that are searched by the shell when you type a command name?

    1. $LIST

    2. $VIEW

    3. $PATH

    4. $ENV

    5. None of the above

  2. In the bash shell, entering the !! command has the same effect as which one of the following (assuming bash is in emacs mode)?

    1. Ctrl-P and Enter

    2. Ctrl-N and Enter

    3. Ctrl-U and Enter

    4. !-2

    5. !2

  3. Name the command that displays pages from the online user’s manual and command reference.

  4. Which of the following commands displays the comments from a bash script? Select all that apply.

    1. find “^#” /etc/rc.d/rc.local

    2. sed ‘/^#/ !d’ /etc/init.d/httpd

    3. grep ^# /etc/init.d/httpd

    4. grep ^# /etc/passwd

    5. locate “^#” /etc/skel/.bashrc

  5. Which one of the following answers creates an environment variable VAR1, present in the environment of a bash child process?

    1. VAR1="fail" ; export VAR1

    2. VAR1="fail" \ export VAR1

    3. VAR1="fail"

    4. set VAR1="fail" ; enable VAR1

    5. export VAR1 \ VAR1="fail"

  6. What SQL command is used to modify data present in a table?

    1. INSERT

    2. WHERE

    3. UPDATE

    4. OVERWRITE

    5. JOIN

  7. What output will the following command generate: seq -s";" -w 1 10

    1. 01;02;03;04;05;06;07;08;09;10

    2. 1;2;3;4;5;6;7;8;9;10

    3. 1;10

    4. 01;02;03;04;05;06;07;08;09;010

    5. None of the above

  8. Adam wants to protect himself from inadvertently overwriting files when copying them, so he wants to alias cp to prevent overwrite. How should he go about this? Select one.

    1. Put alias cp='cp -i' in ~/.bashrc

    2. Put alias cp='cp -i' in ~/.bash_profile

    3. Put alias cp='cp -p' in ~/.bashrc

    4. Put alias cp='cp -p' in ~/.bash_profile

    5. Put alias cp = 'cp -I' in ~/.bashrc ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required