Q1. - (Topic 3)
Which of the following commands is used to change options and positional parameters for a running Bash?
A. history
B. set
C. bashconf
D. setsh
E. envsetup
Answer: B
Q2. CORRECT TEXT - (Topic 3)
Which Bash environment variable defines in which file the user history is stored when exiting a Bash process? (Specify ONLY the variable name.)
Answer: HISTFILE
Q3. - (Topic 3)
Which of the following files, located in the user home directory, is used to store the Bash history?
A. .bash_history
B. .bash_histfile
C. .history
D. .bashrc_history
E. .history_bash
Answer: A
Q4. - (Topic 3)
When running the command
sed -e "s/a/b/" /tmp/file >/tmp/file
While /tmp/file contains data, why is /tmp/file empty afterwards?
A. The file order is incorrect. The destination file must be mentioned before the command to ensure redirection.
B. The command sed did not match anything in that file therefore the output is empty.
C. When the shell establishes the redirection it overwrites the target file before the redirected command starts and opens it for reading.
D. Redirection for shell commands do not work using the > character. It only works using the | character instead.
Answer: C
Q5. - (Topic 4)
Which of the following pieces of information of an existing file is changed when a hard link pointing to that file is created?
A. File size
B. Modify timestamp
C. Link count
D. Inode number
E. Permissions
Answer: C
Q6. - (Topic 4)
Which of the following file permissions belong to a symbolic link?
A. -rwxrwxrwx
B. +rwxrwxrwx
C. lrwxrwxrwx
D. srwxrwxrwx
Answer: C
Q7. - (Topic 2)
Which of the following commands can be used to download the RPM package kernel without installing it?
A. yum download --no-install kernel
B. yumdownloader kernel
C. rpm --download --package kernel
D. rpmdownload kernel
Answer: B
Q8. - (Topic 2)
Which function key is used to start Safe Mode in Windows NT?
A. F10
B. F8
C. F6
D. Windows NT does not support Safe Mode
Answer: D
Q9. CORRECT TEXT - (Topic 3)
Which command displays a list of all background tasks running in the current shell? (Specify ONLY the command without any path or parameters.)
Answer: jobs
Q10. - (Topic 4)
Which of the following commands creates an ext3 filesystem on /dev/sdb1? (Choose TWO correct answers.)
A. /sbin/mke2fs -j /dev/sdb1
B. /sbin/mkfs -t ext3 /dev/sdb1
C. /sbin/mkfs -c ext3 /dev/sdb1
D. /sbin/mke3fs -j /dev/sdb1
Answer: A,B
Q11. - (Topic 3)
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
Q12. - (Topic 3)
When starting a program with the nice command without any additional parameters, which nice level is set for the resulting process?
A. -10
B. 0
C. 10
D. 20
Answer: C
Q13. - (Topic 4)
Which of the following Linux filesystems preallocates a fixed number of inodes at the filesystem's make/creation time and does NOT generate them as needed? (Choose TWO correct answers.)
A. ext3
B. JFS
C. ext2
D. XFS
E. procfs
Answer: A,C
Q14. - (Topic 1)
Which of the following statements is correct when talking about /proc/?
A. All changes to files in /proc/ are stored in /etc/proc.d/ and restored on reboot.
B. All files within /proc/ are read-only and their contents cannot be changed.
C. All changes to files in /proc/ are immediately recognized by the kernel.
D. All files within /proc/ are only readable by the root user.
Answer: C
Q15. - (Topic 3)
Which of the following commands kills the process with the PID 123 but allows the process to "clean up" before exiting?
A. kill -PIPE 123
B. kill -KILL 123
C. kill -STOP 123
D. kill -TERM 123
Answer: D
Q16. - (Topic 4)
What is the purpose of the Filesystem Hierarchy Standard?
A. It is a security model used to ensure files are organized according to their permissions and accessibility.
B. It provides unified tools to create, maintain and manage multiple filesystems in a common way.
C. It defines a common internal structure of inodes for all compliant filesystems.
D. It is a distribution neutral description of locations of files and directories.
Answer: D
Q17. - (Topic 3)
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?
A. -dirmax
B. -maxdepth
C. -maxlevels
D. -n
E. -s
Answer: B
Q18. - (Topic 1)
Which of the following are init systems used within Linux systems? (Choose THREE correct answers.)
A. startd
B. systemd
C. Upstart
D. SysInit
E. SysV init
Answer: B,C,E