score report 117-101

79
QUESTION 1 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? A. >/dev/null B. >/dev/null 1>&2 C. >/dev/null 2>&1 D. 1>&2 >/dev/null E. 2>&1 >/dev/null Answer: C Section: Part 3 Candidate Response: C (Correct) Explanation/Reference: A) redirects only stdout B) would send stdout to /dev/null, then redirect is to stderr, putting all output to stderr D) would first redirect stdout to stderr, then redirect stdout to /dev/null, leaving stderr as it is E) would first redirect stderr to stdout, then only stdout to /dev/null, leaving stderr on stdout cmd &> /dev/null would have the same result as C

Upload: castluci

Post on 21-Apr-2015

45 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Score Report 117-101

QUESTION 1

To prevent a command run as root from sending both standard out (stdout) and standard error (stderr) toany terminal or other file or device.

Which of the following strings should be appended to the command?

A. >/dev/null

B. >/dev/null 1>&2

C. >/dev/null 2>&1

D. 1>&2 >/dev/null

E. 2>&1 >/dev/null

Answer: C

Section: Part 3

Candidate Response: C (Correct)

Explanation/Reference:

A) redirects only stdoutB) would send stdout to /dev/null, then redirect is to stderr, putting all output to stderrD) would first redirect stdout to stderr, then redirect stdout to /dev/null, leaving stderr as it isE) would first redirect stderr to stdout, then only stdout to /dev/null, leaving stderr on stdout

cmd &> /dev/null would have the same result as C

Page 2: Score Report 117-101

QUESTION 2

What tool can you use to print shared library dependencies?

A. ldconfig

B. ldd

C. libdep

D. libpath

E. ldev

Answer: B

Section: Part 1

Candidate Response: B (Correct)

Explanation/Reference:

ldd command prints the shared libraries required by each program or sh ared library specified on thecommand line.

Example:

ldd `which cat` linux-vdso.so.1 => (0x00007fff2b3ff000) libc.so.6 => /lib64/libc.so.6 (0x000000395ce00000) /lib64/ld-linux-x86-64.so.2 (0x000000395ca00000)

Page 3: Score Report 117-101

QUESTION 3

You need to know where all the configuration files for the installed package named "postfix" are located.Assuming it was installed with rpm, which command will list this information for you?

A. rpm -qc postfix

B. rpm -Vc postfix

C. rpm --config postfix

D. rpm -listconfig postfix

E. rpm -qa --config postfix

Answer: A

Section: Part 1

Candidate Response: E (Incorrect)

Explanation/Reference:

-qa --config is invalid-listconfig is invalid--config is invalid-Vc verifies the installation of <package>

Page 4: Score Report 117-101

QUESTION 4

In compliance with the FHS, in which of the following pl aces are man pages typically found?

A. /usr/share/man

B. /opt/man

C. /usr/doc

D. /var/pkg/man

E. /usr/local/man

Answer: A

Section: Part 9

Candidate Response: A (Correct)

Explanation/Reference:

FHS is the Filesystem Hierarchy Standard (see http://www.pathname.com/fhs/pub/fhs-2.3.html)This document defines that manual pages are stored in /usr/share /man

Page 5: Score Report 117-101

QUESTION 5

You have an updated RPM called screensaver-1.1.i386.rpm. You have version 1.0 installed. Using RPM, how do you view the changelog of this file to se e if you should install the update?

A. rpm -qp --changelog screensaver-1.1.i386.rpm

B. rpm --changelog screensaver-1.1.i386.rpm

C. rpm -qc screensaver-1.1.i386.rpm

D. rpm -showchangelog screensaver-1.1.i386.rpm

Answer: A

Section: Part 1

Candidate Response: A (Correct)

Explanation/Reference:

When you use rpm with a specific rpm-file, you need to specify the -p option, and the query-option to showthe changelog is --changelog.-qc would list the config files of an installed package (not an rpm-file)--changelog on its own is an invalid option as is -showchangel og

Page 6: Score Report 117-101

QUESTION 6

Which configuration file should be modified to disable the ctrl-alt-delete key combination?

A. /etc/keys

B. /proc/keys

C. /etc/inittab

D. /proc/inittab

E. /etc/reboot

Answer: C

Section: Part 9

Candidate Response: C (Correct)

Explanation/Reference:

In Linux, this keystroke combination is recognized by the keyboard d evice driver in the kernel. In theabsence of more specific instructions, which will usually only be during system initialization, the kerneldirectly initiates a soft reboot in response. More commonly, the ke rnel will send a signal to the init process,which will perform an administrator-configured task, such as running a script, or displaying an "end currentsession" box in KDE.However, Linux systems can be configured to ignore the keystroke combi nation. The setting is usually inthe inittab(5) configuration file under the keyword "ca".

In newer Linux systems (using upstart) /etc/inittab is replaced by / etc/event.d/

Page 7: Score Report 117-101

QUESTION 7What file is read by the program ldconfig?

A. /lib/ld.so

B. /etc/ld.so.conf

C. /etc/ld.so.cache

D. /etc/modules.conf

Answer: B

Section: Part 2

Candidate Response: B (Correct)

Explanation/Reference:/lib/ld.so is the linux loader and using information collect ed by ldconfig (especially /etc/ld.so.cache)/etc/ld.so.cache is one of the outputs of ldconfig./etc/modules.conf is an optional configuration file used by the modprobe command.

Page 8: Score Report 117-101

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

A. cat turkey.txt|wc -l

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

Answer: B

Section: Part 3

Candidate Response: B (Correct)

Explanation/Reference:

A) would display the linecount of all lines in turkey.txtC) would display an errorD) would display all lines not containing capital lettersE) would display an error

Page 9: Score Report 117-101

QUESTION 9While installing from source code you don't see the configuration script.What command can you run to compile the code?

A. make configure

B. install

C. install makefile

D. make

Answer: D

Section: Part 1

Candidate Response: A (Incorrect)

Explanation/Reference:

there is typically no "make configure" command, as opposed to a ./co nfigure.sh script which creates themakefile.if you already have a makefile use "make" or "make install" to build the binaries.

Page 10: Score Report 117-101

QUESTION 10In GRUB's configuration file you find the line

root (hd1,4)

What is corresponding device name on a Linux system?

A. /dev/hda4

B. /dev/hda5

C. /dev/hdb4

D. /dev/hdb5

Answer: D

Section: Part 9

Candidate Response: D (Correct)

Explanation/Reference:

Grub starts counting harddrives and partitions at zero, thus (hd1, 4) is the 5th partition on the secondharddrive /dev/sdb5 or /dev/hdb5

Page 11: Score Report 117-101

QUESTION 11If Linux detects an ACPI BIOS on bootup, what does it automatically deactivate?

A. PnP

B. PCI

C. ATA

D. APM

Answer: D

Section: Part 1

Candidate Response: D (Correct)

Explanation/Reference:APM is the older Version of ACPI, so it would not make sense to have both in one system.

Page 12: Score Report 117-101

QUESTION 12What command would help you identify the I/O address range being used by the network card?

A. cat /proc/modules

B. cat /proc/devices

C. cat /proc/meminfo

D. cat /proc/dma

E. cat /proc/ioports

Answer: E

Section: Part 1

Candidate Response: E (Correct)

Explanation/Reference:

For example:# cat /proc/ioports[...]9000-9fff : PCI Bus 0000:04 9c00-9c3f : 0000:04:09.0 9c00-9c3f : e1000[...]

/proc/modules contains the loaded kernel modules, /proc/devices th e available devices, /proc/meminfoinformation about memory usage, /proc/dma contains the used dma channels.

Page 13: Score Report 117-101

QUESTION 13Which of these commands allows you to use shared libraries that are in /usr/local/l ib?

A. export LD_PRELOAD=/usr/local/lib

B. export LD_LIBRARY_PATH=/usr/local/lib

C. ldconfig /usr/local/lib

D. ldd /usr/local/lib

Answer: B

Section: Part 9

Candidate Response: B (Correct)

Explanation/Reference:

ld.so searches for shared libraries in LD_LIBRARY_PATH before looking in the standard directories.alternatively you can specify the directory in the /etc/ld.so.conf and running ldconfig.

Page 14: Score Report 117-101

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

A. A core dump file will be created.

B. It affects the entire process group.

C. It makes excessive use of system resources.

D. The action can be blocked by buggy or malicious processes.

E. The affected process is unable to clean up before exiting.

Answer: E

Section: Part 3

Candidate Response: B (Incorrect)

Explanation/Reference:

From wikipedia: When sent to a program, SIGKILL (9) causes it to terminate immediately. In contrast toSIGTERM and SIGINT, this signal cannot be caught or ignored, and the receiving process cannot performany clean-up upon receiving this signal.

Page 15: Score Report 117-101

QUESTION 15From any mode in vi, how do you save a the current file and exit vi?

(give 2 options)

A. ESC :wq!

B. ESC :q!

C. ESC ZZ

D. ESC :Q

Answer: AC

Section: (none)

Candidate Response: D (Incorrect)

Explanation/Reference:

there is no ":" before ZZ!

Page 16: Score Report 117-101

QUESTION 16

Which file is used by ld.so to find libraries quickly without actually havin g to search the directories in itslibrary path?

A. /etc/ld.so.cache

B. /etc/ld.so.conf

C. /etc/ld.so

D. /var/ld/cache

E. /var/.cache

Answer: A

Section: Part 9

Candidate Response: A (Correct)

Explanation/Reference:

B) is used by ldconfig to create /etc/ld.so.cacheC) is the program itselfD) does not exist (on fedora or ubuntu)E) does not exist

Page 17: Score Report 117-101

QUESTION 17

The lspci command can display information about devices except the f ollowing:

A. Card bus speed (e.g. 66Mhz)

B. Card IRQ settings

C. Card vendor identification

D. Card AGP rate (e.g. 1x, 2x, 4x)

E. Card Ethernet MAC address

Answer: E

Section: Part 1

Candidate Response: E (Correct)

Explanation/Reference:

lspci is an utility for displaying information about all PCI buses in the system and all devices connected tothem.To display the MAC address of Ethernet use the ifconfig command.

Example:

# lspci -v04:09.0 Ethernet controller: Intel Corporation 82541PI Gigabit Ethernet Controller (rev 05) Subsystem: Intel Corporation Device 1376 Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 17 Memory at fdce0000 (32-bit, non-prefetchable) [size=128K] Memory at fdcc0000 (32-bit, non-prefetchable) [size=128K] I/O ports at 9c00 [size=64] Expansion ROM at fdb00000 [disabled] [size=128K] Capabilities: [dc] Power Management version 2 Capabilities: [e4] PCI-X non-bridge device Kernel driver in use: e1000 Kernel modules: e1000

Page 18: Score Report 117-101

QUESTION 18

As root you have navigated to directory /B. You wish to move all of the files and directories from directory /Ato directory /B.

Which of the following options would be the most appropri ate command line to execute this task?

A. cp /a/* .

B. mv -f /A/* .

C. mv -Rf /a/* .

D. cp -f /a/* ..

E. cp -rf /A/* /b/

Answer: B

Section: Part 2

Candidate Response: B (Correct)

Explanation/Reference:

Files and folders are case-sensitive, so you can immediately dismiss al l lines with "a" instead of "A", andsince you need to move instead of copy, that leaves only B as the correct answer.

Page 19: Score Report 117-101

QUESTION 19

What command changes the priority of the process running with process id of 12345 to the highest priority?

A. /usr/bin/renice +20 12345

B. /usr/bin/renice -20 12345

C. /bin/setpriority +20 12345

D. /bin/setpriority -20 12345

Answer: B

Section: Part 2

Candidate Response: B (Correct)

Explanation/Reference:

To change the priority of running process use the renice command. Default priority is 0, highest priority is -20 and lowest priority is 19. The path of renice command is /usr/bin/renice.

Page 20: Score Report 117-101

QUESTION 20

What key sequence will suspend the current process and return you to a sh ell prompt?

A. Ctrl-z

B. Ctrl-c

C. Ctrl-x

D. Ctrl-d

Answer: A

Section: Part 2

Candidate Response: A (Correct)

Explanation/Reference:

CTRL+Z sends SIGINT to the current process, sending it to the background,CTRL+C would send SIGTERM, ending the processCTRL+D is used to signal an EOFCTRL+X has no meaning in a shell

Page 21: Score Report 117-101

QUESTION 21

How can you update a package only if an earlier version is currentl y installed on the system?

A. rpm --update rpmname

B. rpm -U rpmname

C. rpm -F rpmname

D. rpm --force rpmname

E. rpm -u rpmname

Answer: C

Section: Part 1

Candidate Response: C (Correct)

Explanation/Reference:

rpm -F, --freshen <package>updates <package>, but only if the package is currently installed .rpm -U, --upgrade <package>updates <package> regardless if the package is installed or not.--force only works in combination with installing or upgrading. -u is an invalid option, as is --update

Page 22: Score Report 117-101

QUESTION 22

Where does lilo store its boot information?

A. Boot ROM

B. Boot RAM

C. Master Boot Record

D. /boot partition

Answer: C

Section: Part 1

Candidate Response: C (Correct)

Explanation/Reference:lilo uses /etc/lilo.conf to store its configuration and uses the 66 bytes of free space in the MBR to install itselfthere (or optionally in the / folder).GRUB uses the /boot folder to store itself and the "compiled" configuration.

Page 23: Score Report 117-101

QUESTION 23

You are preparing a new set of shared libraries in /usr/local/appli b and you have written and compiled somecode that uses these libraries.You have already performed ldconfig, however the system still canno t find the shared libraries.

What is most likely the cause of this?

A. You used the wrong compiler.

B. You did not update your PATH variable.

C. You compiled the code with wrong library.

D. You forgot to put the library path in ld.so.conf

Answer: D

Section: Part 1

Candidate Response: B (Incorrect)

Explanation/Reference:

ldconfig reads the file /etc/ld.so.conf and builds the shared library cache for the loader ld.so.The PATH variable has no influence on the libraries (LD_LIBRARY_ PATH does).

Page 24: Score Report 117-101

QUESTION 24

User Joseph has successfully extracted and compiled a program from source cod e. Installing the binariesproduces errors.

What is the most likely reason?

A. The source code was compiled for a different CPU

B. The permissions set in the /usr/bin directory are wrong

C. The binaries require root privileges to be installed

D. The wrong prefix was used during configuration of the source code

Answer: C

Section: Part 9

Candidate Response: C (Correct)

Explanation/Reference:

Normally only the root user has write-privileges on /usr/bin, insta ll binaries only as root.

Page 25: Score Report 117-101

QUESTION 25

You are about to install a new program on an RPM based Linux system. Which of the following would be the best way to accomplish this?

A. Get the source code in a tarball and install from that source.

B. Get a source RPM and use rpm to install it.

C. Use rpm to install the program's binaries from an RPM package.

D. Use cpio to extract the binaries from a source RPM and use rpm to install those sources.

Answer: C

Section: Part 1

Candidate Response: A (Incorrect)

Explanation/Reference:

If a rpm-file is available the easiest way is to use "rpm" to install it, since the binaries are already available. Ifsource-files are used a development environment (make, gcc, ...) must a lso be available.

Page 26: Score Report 117-101

QUESTION 26

You need to install a fax server. Which type of fax/modem should you install to ensure Linux compatibility?

A. External Serial Fax/modem

B. External USB Fax/modem

C. Internal ISA Fax/modem

D. Internal PCI Fax/modem

Answer: A

Section: Part 1

Candidate Response: A (Correct)

Explanation/Reference:

Older kernels do not support USB, and internal modems need drivers which might not always be available.But a serial driver is active in all linux kernels, making a serial modem the most compatible.

Page 27: Score Report 117-101

QUESTION 27

To what environment variable will you assign or append a value i f you need to tell the dynamic linker to lookin a build directory for some of a program's shared libraries?

A. LD_LOAD_PATH

B. LD_LIB_PATH

C. LD_LIBRARY_PATH

D. LD_SHARE_PATH

E. LD_RUN_PATH

Answer: C

Section: Part 1

Candidate Response: C (Correct)

Explanation/Reference:

ld.so looks in LD_LIBRARY_PATH before looking anywhere else for l ibraries.

Page 28: Score Report 117-101

QUESTION 28

Which of the following would do the same as the command cat < file1.txt > file2.txt?

A. cat < file1.txt file2.txt

B. cat file1.txt >file2.txt

C. cat <file1.txt | file2.txt

D. cat file1.txt | file2.txt

E. cp file1.txt>file2.txt

Answer: B

Section: Part 2

Candidate Response: B (Correct)

Explanation/Reference:

A) would make cat use the redirected stdin and file2.txt as inputC) would pipe the output to file2.txt, which could not read itD) see CE) cp does not display file1.txt so it would make no sense to redirect stdout

Page 29: Score Report 117-101

QUESTION 29

Which system administration command you can use to update ld.so.cache after the installation of newshared libraries?

A. ldconfig

B. ldd

C. libpath

D. newlibs

Answer: A

Section: Part 9

Candidate Response: B (Incorrect)

Explanation/Reference:

ldconfig builds the library cache from the standard library directo ries and the ld.so.conf file

Page 30: Score Report 117-101

QUESTION 30

Which of the following is very important when installing from source code?

(Check TWO that apply)

A. Read all documentation included with the source code.

B. Reboot after installing all programs.

C. Manually check to see if all dependencies are met.

D. Use rpm or dpkg go verify the installation.

E. Do not install binaries as the root user.

Answer: AC

Section: Part 2

Candidate Response: BC (Incorrect)

Explanation/Reference:

Normally you do not need to reboot when installing software , and you need to install binaries as root (untiljust installing software for one user only). When installing from source code you can not use rpm to verifythe install.

Page 31: Score Report 117-101

QUESTION 31

You are installing Linux on a workstation for a new employee. Which partition should be largest?

A. /

B. /boot

C. /lib

D. /usr

Answer: D

Section: Part 1

Candidate Response: D (Correct)

Explanation/Reference:

Considering that employees will usually not have that many fi les stored in their local home directory of aworkstation, but many applications installed, you should consid er making /usr the largest of the partitions,since all applications will be installed there.

Page 32: Score Report 117-101

QUESTION 32

You want 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?

A. foo < foobar | bar

B. foo < foobar > bar

C. foo | foobar > bar

D. foo | bar < foobar

E. foo > bar < foobar

Answer: A

Section: Part 3

Candidate Response: B (Incorrect)

Explanation/Reference:

B) would redirect output into a file called bar (overwriting an existing bar)C) would pipe output of foo to foobarD) would call foo then bar with the input of foobarE) would redirect stdin to file foobar and stdout into file bar (overwriting an existing bar)

Page 33: Score Report 117-101

QUESTION 33

You are running Linux 2.0.36 and you need to add a USB mouse to your system. Which of the followingstatements is true?

A. You need to rebuild the kernel.

B. You need to upgrade the kernel.

C. You need to load the USB modules for your existing modular kernel.

D. USB support is not available in Linux.

Answer: B

Section: Part 1

Candidate Response: B (Correct)

Explanation/Reference:USB support started in Kernel 2.2 (for USB1.0; full support for USB2.0 since Kernel 2.4.; USB3.0 since2.6.31

Page 34: Score Report 117-101

QUESTION 34

After a minor security incident you are instructed by your lead sys-admin to verify the RPM's installed on arunning system.

Which command will create a complete report which you can analyze for changes which may be securityrelated?

A. rpm -Va > report

B. rpm -Qavy > report

C. rpm -Vqt --nomd5 > report

D. rpm --checkfiles > report

E. rpm -Va --nofiles > report

Answer: A

Section: Part 2

Candidate Response: A (Correct)

Explanation/Reference:

-Qavy is an invalid option, as is --checkfiles.--nomd5 is a deprecated option--nofiles would disable checking of any files in the packages

Examplerpm -Va ncursesS........ /usr/bin/captoinfoS........ /usr/bin/clearS........ /usr/bin/infocmpS........ /usr/bin/infotocap[...]would indicate that the file size has changed since install ing the files.

Page 35: Score Report 117-101

QUESTION 35

You have just upgraded your PC to a 60 gigabyte IDE drive. While parti tioning the drive, younotice that only 32 gigabytes are available.

Which of the following will most likely allow you to use the entire drive?

A. Create two smaller partitions of 30 gigabytes each.

B. Set the PC BIOS to use LBA mode.

C. Create a partition that resides entirely below the first 1024 cylinders.

D. Use GRUB or the latest version of LILO as a bootloader.

E. Upgrade the PC BIOS to the latest version available.

Answer: E

Section: Part 1

Candidate Response: C (Incorrect)

Explanation/Reference:

It might be possible that an older Kernel ( < 2.3.21) is the cause of this problem, but since this is not anavailable option the most likely problem is an old BIOS.

Page 36: Score Report 117-101

QUESTION 36

Where can lilo place boot code?

A. The boot ROM

B. The boot RAM

C. The /boot partition

D. The MBR on a hard drive

Answer: D

Section: Part 1

Candidate Response: D (Correct)

Explanation/Reference:

LILO does not use the /boot partition, GRUB1 and GRUB2 do.

Page 37: Score Report 117-101

QUESTION 37

You installed a beta rpm package, but are experiencing some problems wi th it.

How can you remove this package?

A. rpm -qe rpmname

B. rpm -V --remove rpmname

C. rpm -r rpmname

D. rpm -d rpmname

E. rpm -ev rpmname

Answer: E

Section: Part 2

Candidate Response: C (Incorrect)

Explanation/Reference:

To uninstall the package, use

rpm -e, --erase <packagename> (-v for verbose)

-r puts rpm in superuser mode (requires password)-V verifys packages-qe checks if the package is installed-d is working in combination with -q only

Page 38: Score Report 117-101

QUESTION 38

What command would execute cmd1 followed by cmd2, regardless of the exit status of cmd1?

A. cmd1 cmd2

B. cmd1 | cmd2

C. cmd1 ; cmd2

D. cmd1 && cmd2

E. cmd1 || cmd2

Answer: C

Section: Part 3

Candidate Response: C (Correct)

Explanation/Reference:

You can concatenate as many commands as you want by seperating them with a semi-colon.A) cmd1 cmd2 would tell the shell that cmd2 is a parameter of cmd1B) pipe the output of cmd1 to cmd2D) && would check the exit code of cmd1 and only start cmd2 if cmd1 was successfulE) || would check the exit code of cmd1 and only run cmd2 if cmd1 was not successful

Page 39: Score Report 117-101

QUESTION 39

Which of the following GNU commands would be the most likely command you'd use to find the systemload average?

A. top

B. nice

C. loadavg

D. cpustat

E. ps

Answer: A

Section: Part 3

Candidate Response: A (Correct)

Explanation/Reference:

The top program provides a dynamic real-time view of a running system. It can display system summaryinformation as well as a list of tasks currently being managed by the Linux kernel. The types of systemsummary information shown and the types, order and size of informat ion displayed for tasks are all userconfigurable and that configuration can be made persistent across restarts.

ps is used to display the running processes of the user, nice is used to set the priority of a command.cpustat and loadavg does not exist in debian or fedora.

Page 40: Score Report 117-101

QUESTION 40

You are building a server that will undergo many hardware and operating system upgrades. The server isthe file server for all users on your 100 user network.

Which directory should have its own mountpoint and/or hard drive?

A. /boot

B. /sbin

C. /home

D. /etc

Answer: C

Section: Part 2

Candidate Response: C (Correct)

Explanation/Reference:

Since /boot, /sbin and /etc will change with each OS upgrade it's not as important to make them easilymountable. If you create /home on its own harddrive you can easily mount it on every system, and won'tloose user data with every system change.

Page 41: Score Report 117-101

QUESTION 41

You see following output while trying to install an updated package:

[root@example pub]# rpm -i gthumb-2.2.0.i386.rpm package gthumb- 1.0.1.i386.rpm is already installed.

Which command will allow you to install the updated version?

A. rpm -i gthumb-2.2.0.i386.rpm

B. rpm -ivh gthumb-2.2.0.i386.rpm

C. rpm -U gthumb-2.2.0.i3S6.rpm

D. rpm -qu gthumb-2.2.0.i386.rpm

E. rpm -qiv gthumb-2.2.0.i386.rpm

Answer: C

Section: Part 2

Candidate Response: C (Correct)

Explanation/Reference:

-qu, -qiv would indicate rpm-queries,-i was already not working-h is just activating a progress baruse -U or --upgrade to update a package

Page 42: Score Report 117-101

QUESTION 42

What command will remove duplicate lines from a sorted file?

A. filter

B. trim

C. uniq

D. wc

Answer: C

Section: Part 3

Candidate Response: C (Correct)

Explanation/Reference:

uniq - remove duplicate lines from a sorted file

wc - wordcounttrim - remove whitespacesfilter is not standard unix filter command

Page 43: Score Report 117-101

QUESTION 43

Which command would run "make" in the background?

A. make && bg

B. make ; bg

C. make &

D. nohup make

Answer: C

Section: (none)

Candidate Response: C (Correct)

Explanation/Reference:

append & to any command to run it in the background (alternatively use CTRL+Z and bg)

Page 44: Score Report 117-101

QUESTION 44

You are having some trouble with a disk partition and you need to do maintenance on this partition but yourusers home directories are on it and several are logged in.

Which command would disconnect the users and allow you to safely execute maintenance tasks?

A. telinit 1

B. shutdown -r now

C. killall -9 inetd

D. /bin/netstop --maint

E. /etc/rc.d/init.d/network stop

Answer: A

Section: Part 9

Candidate Response: A (Correct)

Explanation/Reference:telinit 1 orders the init process to switch to runlevel 1, stopping all services not configured for runlevel 1,including network and multiuser support.

Page 45: Score Report 117-101

QUESTION 45

You want to preview where the package file, apache-xml.i386.rpm, will insta ll its files before installing it.

What command do you issue?

A. rpm -qp apache-xml.i386.rpm

B. rpm -qv apache-xml.i386.rpm

C. rpm -ql apache-xml.i386.rpm

D. rpm -qpl apache-xml.i386.rpm

Answer: D

Section: Part 9

Candidate Response: B (Incorrect)

Explanation/Reference:

to work with specific rpm-files you need the parameter -p, -ql lists all files for a package.alternatively you could specify the --test parameter when install ing

Page 46: Score Report 117-101

QUESTION 46

What is the PID for the Init that is the parent of all the process?

A. 0

B. 1

C. changes on reboot

D. same as current runlevel

E. -1

Answer: B

Section: (none)

Candidate Response: D (Incorrect)

Explanation/Reference:

init is the first process the kernel starts, so init always has root priviliges and PID 1

Page 47: Score Report 117-101

QUESTION 47

Consider the following commands

A) $ nice -n 1 /usr/bin/somecommandB) $ nice -n 5 /usr/bin/somecommandC) $ nice -n 10 /usr/bin/somecommand

Which instance of somecommand is run with the highest priority?

A. A

B. B

C. C

D. none, only superuser can change the priority

Answer:

Section: (none)Candidate Response: D (Incorrect)

Explanation/Reference:

The lower the nice-value the higher the priority, so A is the correct value.Only the superuser may set negative values, but since A, B and C are using positive values this is irrelevantfor this Question.

Page 48: Score Report 117-101

QUESTION 48

Which TWO commands will find the path for the binary vim?

A. man vim

B. whereis vim

C. apropos vim

D. which vim

Answer: BDSection: Part 2Candidate Response: BD (Correct)

Explanation/Reference:

man displays the manual pages of a command, and apropos shows related commands

Examples:$ which vim/usr/bin/vim$ whereis vimvim: /usr/bin/vim.basic /usr/bin/vim.tiny /usr/bin/vim /usr/bin/vim.gnome /etc/vim /usr/share/vim /usr/share/man/man1/vim.1.gz

Page 49: Score Report 117-101

QUESTION 49

What RPM command would show you detailed information for a package called openssh-3.6.i386.rpm?

A. rpm --showinformation openssh-3.6.i386.rpm

B. rpm --showdetails --package openssh-3.6.i386.rpm

C. rpm --query --info --package openssh-3.6.i386.rpm

D. rpm --verify openssh-3.6.i386.rpm

Answer: C

Section: Part 9

Candidate Response: C (Correct)

Explanation/Reference:

--verify only checks changes on the installed files--showinformation is not a rpm option, as is --showdetails.

rpm -qpi <rpmfile> would display the same results.

Page 50: Score Report 117-101

QUESTION 50

How do you get a list of files that have been installed from a dpkg package?

A. dpkg -l pkgname

B. dpkg -C pkgname

C. dpkg -s pkgname

D. dpkg -S pkgname

E. dpkg -L pkgname

Answer: E

Section: Part 9

Candidate Response: E (Correct)

Explanation/Reference:

-l prints the list of all packages matching pkgname-C checks for broken packages-s displays status information for a package-S searches for a package matching pkgname

Page 51: Score Report 117-101

QUESTION 51

What does the following command do?

cat '$TEST'

A. Displays a bash syntax error message.

B. Displays the contents of the file named $TEST if it exists.

C. Waits for the user to enter text and then echos the text back.

D. Displays the contents of the file named inside the back quotes.

E. Displays the contents of the named by the environment variable TEST.

Answer: BSection: Part 3Candidate Response: D (Incorrect)

Explanation/Reference:

single quotation marks instruct the bash not to do wildcard expansion or variable replacement, so cat willdisplay the file called exactly $TESTuse double quotation marks to get variable replacement, but not wildcard replacement, and no quotations toget both.Do not confuse with `cmd` which evaluates the command and replaces its output on the shell.

Page 52: Score Report 117-101

QUESTION 52

How many SCSI ids for peripherals can SCSI-1 support?

A. 5

B. 6

C. 7

D. 8

Answer: C

Section: Part 1

Candidate Response: D (Incorrect)

Explanation/Reference:

Up to 8 or 16 (Wide-SCSI) devices can be attached to a single bus, and the adapter itself counts as adevice, which leaves 7 or 15 peripherals per bus.

For a complete list of SCSI Properties see http://en.wikipedia.org/wiki/SCSI

Page 53: Score Report 117-101

QUESTION 53

In the vi editor, which of the following commands will delete the current line at the cursor and the16 lines following it (17 lines total)?

A. 17d

B. 17dd

C. 17x

D. d17d

E. 16d

Answer: B

Section: Part 2

Candidate Response: B (Correct)

Explanation/Reference:

Alternative: Answer B or D ist correct!

17x just deletes 17 characters17d or 16d is waiting for additional command input (besides 16dd would delete only 16 lines)

Page 54: Score Report 117-101

QUESTION 54

Which of the following commands is equivalent to kill 1234?

A. kill -1 1234 or kill -s SIGHUP 1234

B. kill -2 1234 or kill -s SIGINT 1234

C. kill -3 1234 or kill -s SIGQUIT 1234

D. kill -9 1234 or kill -s SIGKILL 1234

E. kill -15 1234 or kill -s SIGTERM 1234

Answer: E

Section: Part 3

Candidate Response: E (Correct)

Explanation/Reference:

If no signal is specified kill uses SIGTERM (15) as its default signal to processes.

Page 55: Score Report 117-101

QUESTION 55

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

A. /bin/grep ^# foobar

B. /bin/grep -v ^# foobar

C. /bin/grep #$ foobar

D. /bin/grep -v #$ foobar

Answer: BSection: Part 3Candidate Response: B (Correct)

Explanation/Reference:

A) would grep for all lines starting with #C) would grep for all lines ending with #D) would grep for all lines not ending with #

Page 56: Score Report 117-101

QUESTION 56

You want to save vi changes to the file myfile with :w!, but vi complains it can not write to the file. Therefore,you want to check the write permissions on the file.

To do this without leaving vi, you type:

A. :!ls -l myfile

B. :\ls -l myfile

C. esc :ls -l myfile

D. :?ls -l myfile

Answer: A

Section: Part 2

Candidate Response: A (Correct)

Explanation/Reference:

Use "!command" to issue shell commands from the command prompt of vi

Page 57: Score Report 117-101

QUESTION 57

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

A. --max-dirs

B. -dirmax

C. -maxdepth

D. -s

E. -n

Answer: C

Section: Part 3

Candidate Response: C (Correct)

Explanation/Reference:

from the man pages:-maxdepth levels Descend at most <levels> (a non-negative integer) levels of directories below the command linearguments.

Page 58: Score Report 117-101

QUESTION 58

Which command will allow you to find a specific installed package?

A. rpm --list rpmname

B. rpm -qvl rpmname

C. rpm rpmname

D. rpm -qv rpmname

E. rpm -f rpmname

Answer: D

Section: Part 1

Candidate Response: D (Correct)

Explanation/Reference:

To query the package whether, package is installed or not:

rpm -qv <packagename>

example:

rpm -qv ncurses

It shows rpm fullname, version if installed otherwise it will display package is not installed.

Installed package options:

rpm -qa - lists all installed packages

rpm -qf <filename> - shows owning package for specific file

rpm -qi <packagename> - general information of package

rpm -ql <packagename> - shows all files owned by package

rpm -qvl <packagename> - would also show if a package is installed with the additional information whatfiles where installed on the harddrive.

Page 59: Score Report 117-101

QUESTION 59

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?

A. grep a*^b*a myfile

B. grep .a[^b].a myfile

C. grep .[a].*.[a] myfile

D. grep .a*^b..a myfile

Answer: B

Section: Part 3

Candidate Response: B (Correct)

Explanation/Reference:

A) since ^ without brackets indicates beginning of line, this regex would search for lines where any count of'a' come before the start of the lineC) would find every combination like xabaxD) has the same problem as A

Page 60: Score Report 117-101

QUESTION 1

What does the Filesystem Hierarchy Standard enable?

(Select TWO answers)

A. Software to predict the location of installed files and directories

B. Software to predict the ownership and access rights of installed files and directories

C. Users to predict the location of installed files and directories.

D. Users to predict how the filesystem should be formatted according to need.

Answer: AC

Section: Part 4

Candidate Response: BD (Incorrect)

Explanation/Reference:From the FHS Homepage (http://www.pathname.com/fhs/pub/fhs-2.3.html)

This standard consists of a set of requirements and guidelines for file and directory placement under

UNIX-like operating systems. The guidelines are intended to support interoperability of applications,system administration tools, development tools, and scripts as well as greater uniformity of documentationfor these systems.

Page 61: Score Report 117-101

QUESTION 2

You have just added a CD-ROM drive (/dev/hdd) to your system and have added it to your fstab.

Typically you can use which of the following commands to mount media in that drive to /mnt/cdrom?

A. mount /dev/cdrom /mnt/cdrom

B. mount /dev/cdrom

C. mount -t cdrom/dev/cdrom/mnt/cdrom

D. mount /mnt/cdrom

E. automount/mnt/hdd/mnt/cdrom

Answer: D

Section: Part 4

Candidate Response: D (Correct)

Explanation/Reference:mount can work with either devicename or mountpoint if the device was added in /etc/fstab (and themountpoint exists)(and /dev/cdrom is not the correct devicename)

Page 62: Score Report 117-101

QUESTION 3

To allow a regular user account to mount and unmount a filesystem (for instance, a cdrom or floppy), whichoption will need to be added to the corresponding line in /etc/fstab?

A. nouidchk

B. alluser

C. user

D. auto

Answer: C

Section: Part 3

Candidate Response: A (Incorrect)

Explanation/Reference:Answer C is correct. user options is used to allow an ordinary user to mount the file system. The name ofthe mounting user is written to mtab so that user can unmount the file system again.

Page 63: Score Report 117-101

QUESTION 4

Which of the following commands can be used to instruct the init process to switch runlevels?

(Choose TWO correct answers)

A. telinit

B. initctl

C. init

D. reinit

E. runlevel

Answer: AC

Section: Part 10

Candidate Response: AC (Correct)

Explanation/Reference:From the man pages:telinit - change system runlevelinit is not normally executed by a user process, and expects to have a process id of 1. If this is not the case,it will actually execute telinit(8) and pass all arguments to that.

runlevel - output previous and current runlevelinitctl - init daemon control toolreinit command does not exist (on ubuntu or fedora)

Page 64: Score Report 117-101

QUESTION 5

The system is having trouble and the engineer wants to bypass the usual /sbin/init startup and run /bin/sh.

What is the usual way to pass this change to the kernel from your boot loader?

A. Start in runlevel 1

B. Pass init=/bin/sh on the kernel parameter line

C. Pass /bin/sh on the kernel parameter line

D. Pass start=/bin/sh on the kernel parameter line

Answer: B

Section: Part 10

Candidate Response: A (Incorrect)

Explanation/Reference:

If you use lilo or GRUB you can easily edit the kernel parameter line; any process specified byinit=<command> will be executed with root privileges.

Page 65: Score Report 117-101

QUESTION 6

You are logged in as user tux1, but now you want to switch to user tux2 using tux2's environment.

How would you do this?

A. su tux2

B. su -e tux2

C. su - tux2

D. su -m tux2

E. su -f tux2

Answer: C

Section: Part 5

Candidate Response: C (Correct)

Explanation/Reference:

from the man pages: -, -l, --login Provide an environment similar to what the user would expect had the user logged indirectly.

There are no -e or -f options and -m would not switch the environment (except PATH)

Page 66: Score Report 117-101

QUESTION 9

You are formatting a single hard disk for a Linux install. What is the maximum number of primary partitionsyou can create?

A. 0

B. 1

C. 2

D. 3

E. 4

F. 5

Answer: E

Section: Part 4

Candidate Response: E (Correct)

Explanation/Reference:

On MBR partitioned harddrives only 4 primary partition can be created. (Use extended and logical partitionsto create more partitions).

Page 67: Score Report 117-101

QUESTION 11

Which utility would you use to change how often a filesystem check was performed over an EXT2filesystem (without losing any data stored on that filesystem)?

A. mod2fs

B. fsck

C. tune2fs

D. mke2fs

E. fixe2fs

Answer: C

Section: Part 3

Candidate Response: C (Correct)

Explanation/Reference:tune2fs is used to change parameters in the superblockfsck is used to check the (unmounted) filesystemmke2fs is used to format the partition

Page 68: Score Report 117-101

QUESTION 12

Identify the proper device for the third partition, on the second hard disk, on the first IDE controller on a PCsystem.

A. /dev/hdb3

B. /dev/hd1b3

C. /dev/hdc1b3

D. /dev/hdc1d2p3

Answer: A

Section: Part 3

Candidate Response: D (Incorrect)

Explanation/Reference:

For IDE drives:primary master /dev/hda primary slave /dev/hdb secondary master /dev/hdc secondary slave /dev/hdd So the 3rd partition on the second harddrive is /dev/hdb3 (or /dev/sdb3 for SCSI drives)

Page 69: Score Report 117-101

QUESTION 13

While using the vi editor, you wish to move ahead one page. You should press the control key and:

A. A

B. D

C. F

D. U

Answer: C

Section: Part 5

Candidate Response: A (Incorrect)

Explanation/Reference:

To move screen in vi Editor,

F - go forward one full screen B - go back one full screen D - go down half screen U - go up half screen

Page 70: Score Report 117-101

QUESTION 14

Which of the following commands will list the quota for the user foobar?

A. repquota foobar

B. quota foobar

C. lsquota foobar

D. printquota foobar

Answer: B

Section: Part 5

Candidate Response: A (Incorrect)

Explanation/Reference:

From the man pages:

quota displays users' disk usage and limits. By default only the user quotas are printed.

repquota prints a summary of the disk usage and quotas for the specified file systems.

lsquota and printquota commands do not exist.

Page 71: Score Report 117-101

QUESTION 15

When you are looking for brief information about a program in your PATH with its associated man pages,you would use ...

A. which

B. whereis

C. locate

D. where

Answer: B

Section: Part 5

Candidate Response: A (Incorrect)

Explanation/Reference:

From the man pages:whereis - locate the binary, source, and manual page files for a command

Page 72: Score Report 117-101

QUESTION 16

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

A. standard error to standard input

B. standard input to standard error

C. standard output to standard error

D. standard error to standard output

E. standard output to standard input

Answer: C

Section: Part 3

Candidate Response: C (Correct)

Explanation/Reference:

A) 2>&1B) does not make senseD) 2>&1E) use | (pipe) to redirect stdout to stdin

Page 73: Score Report 117-101

QUESTION 17

You have created a really long letter and after you are done, you notice that you used the name "Bob" manytimes but your forgot to capitalize it in many instances.

Which command would replace "bob" with "Bob" in all instances and generate a new letter for printing?

A. sed '/bob/Bob' letter > newletter

B. sed s/bob/Bob/ letter < newletter

C. sed 's/bob/Bob' letter > newletter

D. sed 's/bob/Bob/g' letter > newletter

E. sed s/bob, Bob/' letter > newletter

Answer: D

Section: Part 5

Candidate Response: D (Correct)

Explanation/Reference:

A) missing replacement option "s", and would not replace all bob with BobB) would not write output to newletter (if it works at all)C) not replacing all occurrences of bobE) wrong syntax for replacement

Page 74: Score Report 117-101

QUESTION 18

When you format the filesystem with the command mkfs -t ext3 -T largefile /dev/hdb1 how much data isrepresented by a single inode?

A. 4 KB

B. 1 MB

C. 2 MB

D. 4 MB

Answer: B

Section: Part 5

Candidate Response: B (Correct)

Explanation/Reference:

From the man pages:-T usage-type[,...] Specify how the filesystem is going to be used, so that mke2fs can choose optimalfilesystem parameters for that use. The usage types that are supported are defined in the configuration file /etc/mke2fs.conf(5)

Some usage types are:news: one inode per 4kb block largefile: one inode per megabyte largefile4: one inode per 4 megabytes

Page 75: Score Report 117-101

QUESTION 19

Which of the following commands will replace every instance of the word list with LIST from the file myfile.txt and print the results on the screen?

A. sed --in-place -e "s/list/LIST/" myfile.txt

B. sed -e "s/list/LIST/" myfile.txt

C. sed --in-place -e "/list/LIST/" myfile.txt

D. sed -e "/list/LIST/" myfile.txt

Answer: B

Section: Part 10

Candidate Response: B (Correct)

Explanation/Reference:

Technically even B) is not the correct answer, but it is the least wrong answer.sed -e "s/list/LIST/g" myfile.txt would replace EVERY occurrance of list in myfile.txt

The other 3 answers either modify the source file, or are just plain wrong.

Page 76: Score Report 117-101

QUESTION 20

What TWO permissions must a user have in order to run a shell script?

A. read

B. write

C. execute

D. browse on the directory

E. users cannot run shell scripts

Answer: AC

Section: Part 4

Candidate Response: BC (Incorrect)

Explanation/Reference:

You do not need write privileges on shell scripts.Directory browsing priviliges are not needed if you know exactly how to start the script, even without thispermission you may change into the directory and start the shell scriptUsers can run any application as long as the specific permission is set (read and execute right for owner,group or others)

Page 77: Score Report 117-101

QUESTION 21

You need to create a simple hierarchy of directories: images/photos/summer/ottawa/

None of the directories on that path exists. What command will create all of the needed directories in onestep?

A. mkdir -r images/photos/summer/ottawa/

B. mkdir -R images/photos/summer/ottawa/

C. mkdir -p images/photos/summer/ottawa/

D. mkdir -P images/photos/summer/ottawa/

E. mkdir -m images/photos/summer/ottawa/

Answer: C

Section: Part 5

Candidate Response: D (Incorrect)

Explanation/Reference:

From the man pages:mkdir - make directories-p, --parents make parent directories as needed

Page 78: Score Report 117-101

QUESTION 37

What would the following line accomplish if run as root?

chown -R bert /home/bert/*

A. Nothing, this command is invalid.

B. It would revoke bert's ownership of all files in /home/bert to bert.

C. It would change user ownership of all files in /home/bert to bert.

D. It would set the group ownership of the directory /home/bert to bert

E. It would set ownership of all files and subdirectories in /home/bert to bert

Answer: E

Section: Part 4

Candidate Response: A (Incorrect)

Explanation/Reference:

From the man pages:chown changes the user and/or group ownership of each given file. -R operate on files and directoriesrecursively

Page 79: Score Report 117-101

QUESTION 51

Which of the following Linux filesysterns pre-allocates a fixed number of inodes at filesysterns make/creation time, and does NOT generate them as needed?

A. ext3

B. jfs

C. reiserfs

D. xfs

Answer: A

Section: Part 4

Candidate Response: C (Incorrect)

Explanation/Reference:

reiserfs does not even use inodesjfs and xfs use dynamic inode allocation