Question 1
Question
You type mkdir one/two/three and receive an error message that reads, in part, No
such file or directory. What can you do to overcome this problem? (Select two.)
Answer
-
Add the --parents parameter to the mkdir command.
-
Issue three separate mkdir commands: mkdir one, then mkdir one/two, and then
mkdir one/two/three.
-
Type touch /bin/mkdir to be sure the mkdir program file exists.
-
Type rmdir one to clear away the interfering base of the desired new directory tree.
-
Type mktree one/two/three instead of mkdir one/two/three.
Question 2
Question
Typing ls -ld wonderjaye reveals a symbolic file mode of drwxr-xr-x. Which of the
following are true? (Select two.)
Answer
-
wonderjaye is a symbolic link.
-
wonderjaye is an executable program.
-
wonderjaye is a directory.
-
wonderjaye has its SUID bit set.
-
wonderjaye may be read by all users of the system.
Question 3
Question
When should programs be configured SUID root?
Answer
-
At all times. This permission is required for executable programs.
-
Whenever a program should be able to access a device file.
-
Only when they require root privileges to do their job.
-
Never. This permission is a severe security risk
-
Whenever the program file is owned by the root user.
Question 4
Question
You see the usrquota and grpquota options in the /etc/fstab entry for a filesystem.
What is the consequence of these entries?
Answer
-
Quota support will be available if it’s compiled into the kernel; it will be automatically
activated when you mount the filesystem.
-
User quotas will be available, but the grpquota option is invalid and will be ignored.
-
Quota support will be disabled on the filesystem in question.
-
Nothing. These options are malformed and so will have no effect
-
Quota support will be available if it’s compiled into your kernel, but you must activate
it with the quotaon command.
Question 5
Question
Which of the following commands can be used to summarize the quota information about
all filesystems?
Answer
-
repquota
-
repquota -a
-
quotacheck
-
quotacheck –a
-
edquota -a
Question 6
Question
Which of the following file-location commands is likely to take the most time to find a file
that may be located anywhere on the computer (assuming the operation succeeds)?
Question 7
Question
What can the type command do that whereis can’t?
Answer
-
Identify the command as being for x86 or x86-64 CPUs
-
Locate commands based on their intended purpose, not just by name
-
Identify a command as an alias, internal command, or external command
-
Assist in typing a command by finishing typing it for you
-
Identify a command as being a binary or a script
Question 8
Question
What can you conclude from the following interaction?
$ which man
/usr/bin/man
Answer
-
The only file called man on the computer is in /usr/bin.
-
The /usr/bin/man program was installed by system package tools.
-
The /usr/bin/man program will be run by any user who types man.
-
The first instance of the man program, in path search order, is in /usr/bin.
-
The user man owns the /usr/bin/man program file.
Question 9
Question
Which one of the following commands copies files with the .txt extension from /dir into /dir2, while preserving file attributes such as dates?
Question 10
Question
Which one of the following file globs matches "Linux" and "linux", but not "linux.com" and not "TurboLinux"?
Answer
-
[L/linux]
-
?inux
-
\L\linux
-
[Ll]inux
-
[Ll]inux?
Question 11
Question
Which one of the following outcomes results from the following command?
#chmod g+s /home/software
Answer
-
The SUID bit will be set for /home/software
-
The SGID bit will be set for /home/software, preventing access by those not a member of the software group.
-
The SGID bit will be set for /home/software, in order to keep group membership of the directory consistent for all files created.
-
The sticky bit will be set for /home/software
-
The sticky bit will be applied to all files in /home/software.
Question 12
Question
Which one of the following commands versosely extracts files from a tar archive on a magnetic tape device?
Answer
-
tar cvf /dev/st0
-
tar cvf /dev/ttyS0
-
tar xvf /dev/st0
-
tar xvf /dev/ttyS0
-
tar rvf /dev/st0
Question 13
Question
Which command can be used to quickly tell you if an executable command is in any directory defined in your $PATH environment variable?
Answer
-
find
-
locate
-
which
-
who
-
what
Question 14
Question
Which directory, according to he Filesystem Hierarchy Standard, is designed to hold essential system binaries?
Answer
-
/sbin
-
/bin
-
/usr/bin
-
/opt/bin
-
/usr/local/bin
Question 15
Question
According to the Filesystem Hierarchy Standard, what directory (or directories) must hold the system kernel? (Select two)
Answer
-
/boot
-
/
-
/opt
-
/sbin
-
/kernel
Question 16
Question
What command(s) can be used to copy data to and from raw devices, bypassing the filesystem? (Select two)
Question 17
Question
A user accidentally created the subdirectory \dir in his home directory. Which of the following commands will remove that directory?
Answer
-
rmdir '~/\dir'
-
rmdir "~/\dir"
-
rmdir ~/'dir'
-
rmdir ~/\dir
-
rmdir ~/\\dir
Question 18
Question
Which of the following commands can be used to locate programs and their corresponding man pages and configuration files?
Answer
-
dirname
-
which
-
basename
-
query
-
whereis
Question 19
Question
In compliance with the FHS, in which of the directories are man pages found?
Answer
-
/usr/share/man
-
/opt/man
-
/usr/doc/
-
/var/pkg/man
-
/var/man
Question 20
Question
Which of the following commands displays the contents of a gzip compressed tar archive?
Question 21
Question
Which of the following commands will send output from the program myapp to both standard output (stdout) and the file file1.log?
Question 22
Question
Which of the following commands will change the quota for a specific user?
Answer
-
edquota
-
repquota
-
quota -e
-
quota
Question 23
Question
Which of the following file permissions belong to a symbolic link?
Answer
-
-rwxrwxrwx
-
+rwxrwxrwx
-
lrwxrwxrwx
-
srwxrwxrwx
Question 24
Question
What is the output of the following command?
#echo "Hello World" | tr -d aieou
Answer
-
Hello World
-
eoo
-
Hll Wrld
-
eoo Hll Wrld
Question 25
Question
In a nested directory structure, which find command line option would be used to restrict the command to searching down a particular number of subdirectories?
Answer
-
-dirmax
-
-maxdepth
-
-maxlevels
-
-n
-
-s
Question 26
Question
Which of the following commands will NOT update the modify timestamp on the file /tmp/myfile.txt?
Answer
-
file /tmp/myfile.txt
-
echo "Hello" >/tmp/myfile.txt
-
sed -ie "s/1/2/" /tmp/myfile.txt
-
echo -n "Hello" >>/tmp/myfile.txt
-
touch /tmp/myfile.txt
Question 27
Question
What does the ? symbol within regular expressions represent?
Answer
-
Match the preceding qualifier one or more times
-
Match the preceding qualifier zero or more times.
-
Match the preceding qualifier zero or one times.
-
Match a literal ? character.
Question 28
Question
Which of the following commands prints all files and directories within the /tmp directory or its subdirectories
which are also owned by the user root? (Choose TWO correct answers.)
Answer
-
find /tmp -uid root -print
-
find -path /tmp -uid root
-
find /tmp -user root -print
-
find /tmp -user root
-
find -path /tmp -user root print
Question 29
Question
Which of the following commands changes the ownership of file.txt to the user dan and the group staff?
Question 30
Question
Which of the following commands makes /bin/foo executable by everyone but writable only by its owner?
Answer
-
chmod u=rwx,go=rx /bin/foo
-
chmod o+rwx,a+rx /bin/foo
-
chmod 577 /bin/foo
-
chmod 775 /bin/foo
Question 31
Question
Which of the following commands can be used to display the inode number of a given file?
Question 32
Question
Which of the following commands are common Linux commands for file management? (Choose three
correct answers.)
Question 33
Question
Which of the following commands can be used to create a new file that is 100kB in size?
Question 34
Question
In compliance with the FHS, in which of the following directories are documentation files found?
Question 35
Question
Which chown command will change the ownership to dave and the group to staff on a file named
data.txt?
Answer
-
chown dave/staff data.txt
-
chown –u dave –g staff data.txt
-
chown --user dave --group staff data.txt
-
chown dave:staff data.txt
Question 36
Question
Which of the following is the GRUB 2 boot loader configuration file?
Answer
-
/dev/grub
-
The MBR
-
/boot/grub/grub.conf
-
/boot/grub/grub.cfg
-
/boot/grub/menu.lst
Question 37
Question
What program do you use to start or stop services when using the systemd initialization
process?
Answer
-
journalctl
-
systemctl
-
init
-
service
-
systemd
Question 38
Question
What is an advantage of vi over graphical text editors?
Answer
-
vi is X based, so it is easier to use than other graphical text editors.
-
vi encodes text in EBCDIC, which is more flexible than Emacs’s ASCII.
-
vi’s mode-based operations permit it to handle non-English languages.
-
vi includes a built-in web browser and email client; Emacs doesn’t.
-
vi is smaller, so it can fit on compact emergency USB flash drive systems and embedded
devices.
Question 39
Question
How do you exit vi’s insert mode to type command-mode commands?
Question 40
Question
What line in /etc/inittab would indicate that your default runlevel is 5?
Answer
-
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
-
id:5:initdefault:
-
si:5:sysinit:/etc/init.d/rcS
-
l5:5:wait:/etc/init.d/rc 5
-
1:2345:respawn:/sbin/getty 38400 tty1