web analytics

Which of the following commands can be used to locate programs and their corresponding man pages and configuration files?

Which of the following commands can be used to locate programs and their corresponding man pages and configuration files? A. dirname B. which C. basename D. query E. whereis Answer:

In order to display all currently mounted filesystems, which of the following commands could be used? (Choose TWO correct answers.)

In order to display all currently mounted filesystems, which of the following commands could be used? (Choose TWO correct answers.) A. cat /proc/self/mounts B. free C. mount D. lsmounts E.

Which of the following is the device file name for the second partition on the only SCSI drive?

Which of the following is the device file name for the second partition on the only SCSI drive? A. /dev/hda1 B. /dev/sda2 C. /dev/sd0a2 D. /dev/sd1p2 Answer: B

Which of the following settings for umask ensures that new files have the default permissions -rw- ? r—–

Which of the following settings for umask ensures that new files have the default permissions -rw- ? r—– A. 0017 B. 0640 C. 0038 D. 0027 Answer: D

What does the command mount -a do?

What does the command mount -a do? A. It ensures that all file systems listed with the option noauto in /etc/fstab are mounted. B. It shows all mounted file systems

Which of the following commands can be used to search for the executable file foo when it has been placed in a directory not included in $PATH?

Which of the following commands can be used to search for the executable file foo when it has been placed in a directory not included in $PATH? A. apropos B.

Which of the following commands makes /bin/foo executable by everyone but writable only by its owner?

Which of the following commands makes /bin/foo executable by everyone but writable only by its owner? A. chmod u=rwx,go=rx /bin/foo B. chmod o+rwx,a+rx /bin/foo C. chmod 577 /bin/foo D. chmod

Which of the following commands changes the ownership of file.txt to the user dan and the group ? staff

Which of the following commands changes the ownership of file.txt to the user dan and the group ? staff A. chown dan/staff file.txt B. chown dan:staff file.txt C. chown -u

After moving data to a new filesystem, how can the former path of the data be kept intact in order to avoid reconfiguration of existing applications? (Choose TWO correct answers.)

After moving data to a new filesystem, how can the former path of the data be kept intact in order to avoid reconfiguration of existing applications? (Choose TWO correct answers.)

After successfully creating a hard link called bar to the ordinary file foo, foo is deleted from the filesystem. Which of the following describes the resulting situation?

After successfully creating a hard link called bar to the ordinary file foo, foo is deleted from the filesystem. Which of the following describes the resulting situation? A. foo and

Which of the following are valid stream redirection operators within Bash? (Choose THREE correct answers.) A

Which of the following are valid stream redirection operators within Bash? (Choose THREE correct answers.) A. < B. >> E. %> Answer: ABC

Which of the following commands can be used to determine how long the system has been running? (Choose TWO correct answers.)

Which of the following commands can be used to determine how long the system has been running? (Choose TWO correct answers.) A. uptime B. up C. top D. uname -u

Which of the following output is created?

When given the following command line. echo “foo bar” | tee bar | cat Which of the following output is created? A. cat B. foo bar C. tee bar D.

While /tmp/file contains data, why is /tmp/file empty afterwards?

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

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.)

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.) A.

Which of the following commands determines the type of a file by using a definition database file which contains information about all common file types?

Which of the following commands determines the type of a file by using a definition database file which contains information about all common file types? A. magic B. type C.

Which variable defines the directories in which a Bash shell searches for executable commands?

Which variable defines the directories in which a Bash shell searches for executable commands? A. BASHEXEC B. BASHRC C. PATH D. EXECPATH E. PATHRC Answer: C

Which of the following command sets the Bash variable named TEST with the content FOO?

Which of the following command sets the Bash variable named TEST with the content FOO? A. set TEST=”FOO” B. TEST = “FOO” C. var TEST=”FOO” D. TEST=”FOO” Answer: D

What happens after issuing the command vi without any additional parameters?

What happens after issuing the command vi without any additional parameters? A. vi starts and loads the last file used and moves the cursor to the position where vi was

Which of the following signals is sent to a process when the key combination CTRL+C is pressed on the keyboard?

Which of the following signals is sent to a process when the key combination CTRL+C is pressed on the keyboard? A. SIGTERM B. SIGINT C. SIGSTOP D. SIGKILL Answer: B

Which of the following commands prints a list of usernames (first column) and their primary group (fourth column) from the /etc/passwd file?

Which of the following commands prints a list of usernames (first column) and their primary group (fourth column) from the /etc/passwd file? A. fmt -f 1,4 /etc/passwd B. split -c

Which of the following commands will print the last 10 lines of a text file to the standard output?

Which of the following commands will print the last 10 lines of a text file to the standard output? A. cat -n 10 filename B. dump -n 10 filename C.

Which character, added to the end of a command, runs that command in the background as a child process of the current shell?

Which character, added to the end of a command, runs that command in the background as a child process of the current shell? A. ! B. + C. & D.

Which of the following commands will reduce all consecutive spaces down to a single space?

Which of the following commands will reduce all consecutive spaces down to a single space? A. tr ‘\s’ ‘ ‘ < a.txt > b.txt B. tr -c ‘ ‘ <

When starting a program with the nice command without any additional parameters, which nice level is set for the resulting process?

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:

Which of the following sequences in the vi editor saves the opened document and exits the editor? (Choose TWO correct answers.)

Which of the following sequences in the vi editor saves the opened document and exits the editor? (Choose TWO correct answers.) A. esc ZZ B. ctrl :w! C. esc zz

In the vi editor, which of the following commands will copy the current line into the vi buffer?

In the vi editor, which of the following commands will copy the current line into the vi buffer? A. c B. cc C. 1c D. yy E. 1y Answer: D

Which of the following shell redirections will write standard output and standard error output to a file named filename?

Which of the following shell redirections will write standard output and standard error output to a file named filename? A. 2>&1 >filename B. >filename 2>&1 C. 1>&2>filename D. >>filename E.

Which shell command is used to continue background execution of a suspended command?

Which shell command is used to continue background execution of a suspended command? A. & B. bg C. cont D. exec E. :& Answer: B

Which of the following statements is correct?

Regarding the command: nice -5 /usr/bin/prog Which of the following statements is correct? A. /usr/bin/prog is executed with a nice level of -5. B. /usr/bin/prog is executed with a nice

From a Bash shell, which of the following commands directly executes the instruction from the file /usr/ without starting a subshell? (Please select TWO answers.) local/bin/runme.sh

From a Bash shell, which of the following commands directly executes the instruction from the file /usr/ without starting a subshell? (Please select TWO answers.) local/bin/runme.sh A. source /usr/local/bin/runme.sh B.

Which of the following commands replaces each occurrence of ‘bob’ in the file letter with ‘Bob’ and writes the result to the file newletter?

Which of the following commands replaces each occurrence of ‘bob’ in the file letter with ‘Bob’ and writes the result to the file newletter? A. sed ‘/bob/Bob’ letter > newletter

Which of the following commands is used to change options and positional parameters for a running Bash?

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

Which grep command will print only the lines that do not end with a / in the file foo?

Which grep command will print only the lines that do not end with a / in the file foo? A. grep ‘/$’ foo B. grep ‘/#’ foo C. grep -v

Which of the following commands displays the contents of a gzip compressed tar archive?

Which of the following commands displays the contents of a gzip compressed tar archive? A. gzip archive.tgz | tar xvf – B. tar ztf archive.tgz C. gzip -d archive.tgz |

Which of the following files, located in the user home directory, is used to store the Bash history?

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

In the vi editor, how can commands such as moving the cursor or copying lines into the buffer be issued multiple times or applied to multiple rows?

In the vi editor, how can commands such as moving the cursor or copying lines into the buffer be issued multiple times or applied to multiple rows? A. By using

What does the ? symbol within regular expressions represent?

What does the ? symbol within regular expressions represent? A. Match the preceding qualifier one or more times. B. Match the preceding qualifier zero or more times. C. Match the

What is the effect of the egrep command when the -v option is used?

What is the effect of the egrep command when the -v option is used? A. It enables color to highlight matching parts. B. It only outputs non-matching lines. C. It

Which of the following commands moves and resumes in the background the last stopped shell job?

Which of the following commands moves and resumes in the background the last stopped shell job? A. run B. bg C. fg D. back Answer: B

What is the difference between the i and a commands of the vi editor?

What is the difference between the i and a commands of the vi editor? A. i (interactive) requires the user to explicitly switch between vi modes whereas a (automatic) switches

What is the default action of the split command on an input file?

What is the default action of the split command on an input file? A. It will break the file into new files of 1,024 byte pieces each. B. It will

What is the default nice level when a process is started using the nice command?

What is the default nice level when a process is started using the nice command? A. -10 B. 10 C. 20 D. 0 Answer: B

Which of the following commands will NOT update the modify timestamp on the file /tmp/myfile.txt?

Which of the following commands will NOT update the modify timestamp on the file /tmp/myfile.txt? A. file /tmp/myfile.txt B. echo “Hello” >/tmp/myfile.txt C. sed -ie “s/1/2/” /tmp/myfile.txt D. echo -n

Which of the following characters can be combined with a separator string in order to read from the current input source until the separator string, which is on a separate line and without any trailing spaces, is reached?

Which of the following characters can be combined with a separator string in order to read from the current input source until the separator string, which is on a separate

What is the output of the following command?

What is the output of the following command? echo “Hello World” | tr -d aieou A. Hello World B. eoo C. Hll Wrld D. eoo Hll Wrld Answer: C

What is the purpose of the Bash built-in export command?

What is the purpose of the Bash built-in export command? A. It allows disks to be mounted remotely. B. It runs a command as a process in a subshell. C.

Which of the following commands will send output from the program myapp to both standard output (stdout) and the file file1.log?

Which of the following commands will send output from the program myapp to both standard output (stdout) and the file file1.log? A. cat < myapp | cat > file1.log B.

In compliance with the FHS, in which of the directories are man pages found?

In compliance with the FHS, in which of the directories are man pages found? A. /usr/share/man B. /opt/man C. /usr/doc/ D. /var/pkg/man E. /var/man Answer: A

A user accidentally created the subdirectory \dir in his home directory. Which of the following commands will remove that directory?

A user accidentally created the subdirectory \dir in his home directory. Which of the following commands will remove that directory? A. rmdir ‘~/\dir’ B. rmdir “~/\dir” C. rmdir ~/’dir’ D.