LX0-102 Pract

Card Set Information

Author:
m6soto
ID:
168646
Filename:
LX0-102 Pract
Updated:
2012-09-04 03:34:45
Tags:
Linux
Folders:

Description:
Linux+ 2 of 2
Show Answers:

Home > Flashcards > Print Preview

The flashcards below were created by user m6soto on FreezingBlue Flashcards. What would you like to do?


  1. Legacy program for sending files to printer queue is:
    A. lpd
    B. lpq
    C. lpp
    D. lpr
    D. lpr
    (this multiple choice question has been scrambled)
  2. What entry can be added to syslog.conf to have all syslog msgs generated send to virtual console 12?
    A. *.* /dev/tty12
    B. mail.* /dev/tty12
    C. | /dev/tty12
    D. syslog tty12
    E. /var/log/messages | /dev/tty12
    A. *.* /dev/tty12
    (this multiple choice question has been scrambled)
  3. On a system running the K Display Mgr, when is the /etc/kde4/kdm/Xreset script automatically executed?
    A. When x is restarted
    B. When x crashes
    C. When KDM starts
    D. When a user's x session exits
    E. When KDM crashes
    D. When a user's x session exits
    (this multiple choice question has been scrambled)
  4. Which of the following SQL statements will select the fields name and address from the contacts table?
    A. SELECT (name, address) FROM contacts;
    B. SELECT (name address) FROM contacts;
    C. SELECT name, address FROM contacts;
    D. SELECT name address FROM contacts;
    C. SELECT name, address FROM contacts;
    (this multiple choice question has been scrambled)
  5. Which command will print the exit value of the previous command to the screen in bash?
    A. echo $status
    B. echo $exit
    C. echo $&
    D. echo $?
    E. echo $#
    D. echo $?
    (this multiple choice question has been scrambled)
  6. Suppose that the cmd netstat -a hangs for a long time without producing output. You might suspect:
    A. a problem with NIS
    B. a problem with NFS
    C. a problem with DNS
    D. that the netstat daemon has crashed
    E. a problem with routing
    C. a problem with DNS
    (this multiple choice question has been scrambled)
  7. Which of the following lines would you find in the file /etc/resolv.conf?
    a. order hosts,bind
    b. 192.168.168.4 dns-server
    c. hosts: files,dns
    d. domain mycompany.com
    • d. domain mycompany.com
    • Don't confuse this with /etc/nsswitch.conf
  8. Which of the following looks like a correct entry in the /etc/hosts file?
    A. localhost.localdomain localhost 127.0.0.1
    B. localhost 127.0.0.1 localhost.localdomain
    C. localhost.localdomain 127.0.0.1 localhost
    D. 127.0.0.1 localhost.localdomain localhost
    E. localhost localhost.localdomain 127.0.0.1
    D. 127.0.0.1 localhost.localdomain localhost
    (this multiple choice question has been scrambled)
  9. When attempting to send a file to another user securely using GPG, which of the following actions must be done?
    A. Encrypt the file using your public key
    B. Encrypt the file using their public key
    C. Encrypt the file using their private key
    D. Sign the file with your public key
    E. Encrypt the file using your private key
    B. Encrypt the file using their public key
    (this multiple choice question has been scrambled)
  10. You need to pause the CUPS printer HPLaserjet4, and you want to cancel all print jobs with a message "Hello." Cmd to do this?
    a. cupsreject -c -r hello HPLaserjet4
    b. cupsreject -p -m hello HPLaserjet4
    c. cupsdisable -c -r hello HPLaserjet4
    d. cupsdisable -p -m hello HPLaserjet4
    • c. cupsdisable -c -r hello HPLaserjet4
    • -c is cancel
    • -r is to print a reason.
  11. What output will the following cmd sequence produce?
    echo '1 2 3 4 5 6' | while read a b c; do
    echo result: $c $b $a; done
    A. result: 3 4 5 6 2 1
    B. result: 3 2 1
    C. result: 1 2 3 4 5 6
    D. result: 6 5 4 3 2 1
    E. result: 6 5 4
    A. result: 3 4 5 6 2 1
    (this multiple choice question has been scrambled)
  12. Your investigation of a system turns up a file that contains the line below:
    find /home -iname .rhosts -exec rm -f {} \;
    What's the purpose of this script?
    a. To enhance system security
    b. To remove all program error dumps
    c. To remove all temporary files in user's home dirs.
    d. To reset the configuration for the rsh and rexec utilities.
    • a. To enhance system security
    • .rhosts file controls which machines trust other machines for access to your account. Bypasses need for a password.
  13. You need to print 12 copies of the document foo.txt. Which cmd would you use?
    A. cat foo.txt | lpr -#12
    B. cat foo.txt > lpr -12
    C. cat foo.txt | lpr -12
    D. cat foo.txt > lpr -#12
    A. cat foo.txt | lpr -#12
    (this multiple choice question has been scrambled)
  14. What BASH env var will prevent you from overwriting a file with > or >>?
    A. set -o noglob
    B. set -o nooverwrite
    C. set -o noclobber
    D. set -o append
    E. set -o safe
    C. set -o noclobber
    (this multiple choice question has been scrambled)
  15. In the following cmd and its output:
    $ echo $$
    12942
    What is 12942?
    A. the process ID of the echo cmd
    B. the process ID of the last executed cmd
    C. the process ID of the current shell
    D. the process ID of the last backgrounded cmd.
    C. the process ID of the current shell
    (this multiple choice question has been scrambled)
  16. We have bash script ~/myscript show below:
    shift echo $2
    We call this script:
    ~/myscript alpha beta gamma delta
    What will we see?
    A. delta
    B. alpha
    C. gamma
    D. beta
    C. gamma
    (this multiple choice question has been scrambled)
  17. To test a shell script called mysript, the env var FOOBAR must be removed temporarily. How can this be done?
    A. set -a FOOBAR=""
    B. env -i FOOBAR myscript
    C. env -u FOOBAR myscript
    D. unset -v FOOBAR
    C. env -u FOOBAR myscript
    (this multiple choice question has been scrambled)
  18. Which of the following commands shows ONLY the user-id of Bob?
    a. cat /etc/passwd | grep Bob | cut -d: -f3
    b. cat /etc/passwd | grep Bob | cut -f: -d3
    c. grep Bob /etc/passwd | awk -F: '{ print $3 }'
    d. grep Bob /etc/passwd | awk -f: '{ print $3 }'
    e. grep Bob /etc/passwd | cut -F: -d3
    • a. cat /etc/passwd | grep Bob | cut -d: -f3
    • c. grep Bob /etc/passwd | awk -F: '{ print $3 }'
    • For awk, -F specifies delimiter.
  19. Which cmd allows you to make a shell var visible to subshells?
    A. export $VARIABLE
    B. set VARIABLE
    C. set $VARIABLE
    D. env variable
    E. export VARIABLE
    E. export VARIABLE
    (this multiple choice question has been scrambled)
  20. On a system using shadowed passwords, the correct permissions for /etc/passwd are __ and the correct permissions for /etc/shadow are __.
    A. -rw-r-----, -r--------
    B. -rw-r--r--, -r--------
    C. -rw-r--rw-, -r-----r--
    D. -rw-r--r--, -r--r--r--
    E. -rw-------, -r--------
    B. -rw-r--r--, -r--------
    (this multiple choice question has been scrambled)
  21. Which of the following lines would you find in the file /etc/host.conf?
    a. order hosts, bind
    b. 192.168.168.4 dns-server
    c. hosts: files, dns
    d. domain mycompany.com
    • a. order hosts, bind
    • hosts refers to /etc/hosts and bind refers to DNS lookup.
  22. Which two services resolve Netbios names to IP addresses?
    a. WINS
    b. NetbiosSVC
    c. smbd
    d. nmbd
    e. DNS
    • a. WINS
    • d. nmbd
  23. Which of the following will run a file named /myscript every 23 minutes past midnight every 2 hours?
    A. 23 0-23/2 * * * /myscript
    B. 23 */0-23 * * * /myscript
    C. 23 @2 * * * /myscript
    D. 11 2/0-23 * * * /myscript
    A. 23 0-23/2 * * * /myscript
    (this multiple choice question has been scrambled)
  24. Which of the following lines would you expect to see in the file /etc/protocols?
    A. tftp dgram udp wait root /usr/sbin/tcpd in.tftpd
    B. udp 17 UDP
    C. in.ftpd: LOCAL
    D. tftp 69/udp
    B. udp 17 UDP
    (this multiple choice question has been scrambled)
  25. How can you verify the integrity of the /etc/passwd file?
    A. pwck
    B. chkpw
    C. pwchk
    D. ckpw
    A. pwck
    (this multiple choice question has been scrambled)
  26. User bob complains that he can't access his email. In which dir would you look to see if there's any deliverable mail for him?
    A. /var/spool/mail
    B. /var/mail/mqueue
    C. /var/spool/mqueue
    D. /home/bob/.mail
    A. /var/spool/mail
    (this multiple choice question has been scrambled)
  27. To avoid spammers using your mail server to relay their messages, you need to ______.
    A. Set up a ruleset for this in /etc/sendmail.cf
    B. Set up relay control in your DNS's MX record.
    C. Recompile sendmail with the -NORELAY flag.
    D. Disable the relay control in /etc/aliases
    A. Set up a ruleset for this in /etc/sendmail.cf
    (this multiple choice question has been scrambled)
  28. One of your users has installed a commercial publishing program that works under X on a variety of Unix and Linux platforms. The user made a series of config changes regarding the initial window size, location and color. Now he is having difficulties undoing these changes and is asking for your help. In which file would you think you would most likely find the configuration settings you are seeking to change?
    A. ~/.xconfig
    B. /etc/X11/XF86Config
    C. ~/.xinitrc
    D. ~/.Xdefaults
    D. ~/.Xdefaults
    (this multiple choice question has been scrambled)
  29. Your machine's IP address used to function, but it's only got the localhost "lo" entry now. What three client-mode commands could you possibly use to get a new DHCP address?
    a. dhcpd
    b. ipconfig
    c. dhclient
    d. pump
    e. dhcpcd
    • c. dhclient
    • d. pump
    • e. dhcpcd
  30. What are the first two characters of an MD5 hashed password?
    A. $1
    B. 2a
    C. $5
    D. $6
    A. $1
    (this multiple choice question has been scrambled)

What would you like to do?

Home > Flashcards > Print Preview