1Z0-409 Oracle Linux Fundamentals Practice Exam Set 1

Identify the feature that is common to both the GNOME and KDE desktops.


Options are :

  • Both are themeable (Correct)
  • Both are created by FSF
  • built on the Qt library
  • built on the GTK library
  • Both use metacity as the default window manager

Answer : Both are themeable

The user smith issued the PS1='[\w \d \! \#]'command.
What is the purpose of using this command?


Options are :

  • to display the date, history number, and a "#" at his shell prompt
  • to display the week day, date, history number, and a "#" at his shell prompt
  • to display the command number, date, and "#" at his shell prompt along with the working directory
  • to display the command number and history number of the command, date, and current working directory at his shell prompt (Correct)

Answer : to display the command number and history number of the command, date, and current working directory at his shell prompt

You want to archive a directory and its subdirectories (excluding a list of subdirectories from a file)
using the tar command. Which option would help you to do this?


Options are :

  • --exclude
  • -X (Correct)
  • -F
  • -C

Answer : -X

As a Linux system administrator you want to check and print the names of the users having UID >
500, and are not using the bash or csh shell. Which two commands would help you to do so?
(Choose two.)
A. awk -F: '/([^(bash|csh)])$/ {if ($3 >500) print $1}' /etc/passwd
B. awk -F: '/([(bash)]|[(csh)])$/ {if ($3 >500) print $1}' /etc/passwd
C. awk -F: '/([^(bash)]|[^(csh)])$/ {if ($3 >500) print $1}' /etc/passwd
D. awk -F: '/([^(nologin)]|[^(ksh)])$/ {if ($3 >500)print$2}' /etc/passwd


Options are :

  • B,D
  • A,B
  • A,C (Correct)
  • D,A

Answer : A,C

Match the following variables available to the user that are set internally by the shell, with their
descriptions:
1) $1 - $9 a) process ID of the shell
2) $* b) the string containing all the arguments to the shell
3) $? c) process ID of the last command run in the background
4) $$ d) positional parameters
5) $! e) exit status of the most recently executed command


Options are :

  • 1-d, 2-a, 3-c, 4-b, 5-e
  • 1-d, 2-c, 3-a, 4-b, 5-e
  • 1-d, 2-a, 3-e, 4-b, 5-c
  • 1-d, 2-b, 3-e, 4-a, 5-c (Correct)

Answer : 1-d, 2-b, 3-e, 4-a, 5-c

You want a script to be automatically run for the default graphical desktop as soon as you log in.
What would you do to achieve this task?


Options are :

  • Go to Applications > System Settings > Add/Remove Applications and add the absolute path of the script.
  • Go to Applications > Preferences > More Preferences > Sessions and add the absolute path of the script in Startup programs (Correct)
  • Go to Applications > Preferences >More Preferences->Preferred Applications and add the absolute path of the script
  • Go to Applications > System Tools > Task Scheduler and add the absolute path of the script

Answer : Go to Applications > Preferences > More Preferences > Sessions and add the absolute path of the script in Startup programs

You have issued the following command:
echo -e "Welcome\nTo Oracle\nEnterprise\rLinux"
Why would you use the -e switch? (Choose two.)
A. to redirect the output to the standard output device
B. to remove the normal newline character from the end of the output
C. to cause echo to honor the escape sequence for the carriage return
D. to cause echo to honor the escape sequence for both the newline characters


Options are :

  • B,D
  • C,D (Correct)
  • A,C
  • A,B

Answer : C,D

A normal user bob wants to get into the graphical mode and executes the startx command. Identify
the statement that holds true in this context.


Options are :

  • The user is taken into the graphical mode and the system prompts for a password to log in.
  • The user is taken into the graphical mode and the system continues in the old run level and prompts for a password for the user to log in
  • The system switches to run level 5.
  • The user is taken into the graphical mode without being prompted for a password. (Correct)

Answer : The user is taken into the graphical mode without being prompted for a password.

Which system help facility gives the help page exactly as using -k switch with man?


Options are :

  • whatis
  • info
  • --help option with the command
  • apropos (Correct)

Answer : apropos

Match the following Regular Expression Quantifiers with their appropriate values:
1) * a) match 0 or 1 times
2) + b) match exactly n times
3) ? c) match at least n times
4) {n} d) match 0 or more times
5) {n,} e) match 1 or more times


Options are :

  • 1-d, 2-a, 3-e, 4-b, 5-C
  • 1-d, 2-e, 3-a, 4-b, 5-c (Correct)
  • 1-a, 2-e, 3-d, 4-c, 5-b
  • 1-e, 2-d, 3-a, 4-c, 5-b

Answer : 1-d, 2-e, 3-a, 4-b, 5-c

Match the mpage options with their functionalities.
1. mpage -r a. toggle printing on both sides of the paper (duplex mode)
2. mpage -t b. print in landscape mode instead of the default portrait
3. mpage -l c. reverse the order in which the pages are printed


Options are :

  • 1-b, 2-a, 3-c
  • 1-b, 2-c, 3-a
  • 1-c, 2-b, 3-a
  • 1-c, 2-a, 3-b (Correct)

Answer : 1-c, 2-a, 3-b

Which commands, without any options, could help a user to read the entire contents of a text file in
his or her home directory? (Choose two.)
A. xxd
B. less
C. grep
D. head
E. more
F. strings


Options are :

  • A,E
  • B,E (Correct)
  • D,F
  • C,E

Answer : B,E

The user smith , whose primary group is smith, would like to create a file in his home directory,
which belongs to the group apps.
Which two statements are correct? (Choose two.)
A. SGID should be set on the destination directory to let users create files that belong to the group
other than their primary group.
B. The user smith could create a file that belongs to the apps group only if his private group is the
apps group as per /etc/group.
C. The user smith could use the newgrp command to log in to the apps group and his private
group will be changed to apps group for a particular session if his name is listed in /etc/group as a
member of apps group.
D. The user smith could use the newgrp command to log in to the apps group, but a password is
required to change his private group to apps group for a particular session if his name is not listed
in /etc/group as a member of apps group.


Options are :

  • C,D (Correct)
  • D,A
  • A,B
  • B,C

Answer : C,D

Match the following Regular Expression Character classes with their class descriptions:
1) [:alnum:] a) match all control characters
2) [:alpha:] b) match all printable characters (not including space)
3) [:graph:] c) match all letters and digits
4) [:print:] d) match all letters
5) [:cntrl:] e) match all printable characters


Options are :

  • 1-d, 2-c, 3-e, 4-b, 5-a
  • 1-d, 2-c, 3-b, 4-e, 5-a
  • 1-c, 2-d, 3-b, 4-e, 5-a (Correct)
  • 1-c, 2-d, 3-e, 4-a, 5-b

Answer : 1-c, 2-d, 3-b, 4-e, 5-a

What are the extra features that the Bourne Again Shell (bash) has compared to the Bourne Shell
(sh)? (Choose all that apply.)                                                                                                                                                                        A. background exit status                                                                                                                                                                            B. read values from the terminal                                                                                                                                                                  C. combine STDOUT and STDERR                                                                                                                                                                D. file name completion and command history                                                                                                                                          E. allows functions and variables with the same name                                                                                                                              F. expansion of positional parameters beyond $9 with ${num}


Options are :

  • C,E,A
  • B,D,F
  • A,B,C
  • D,E,F (Correct)

Answer : D,E,F

The user bob on station1 wants to chat using talk with smith on station2 in the same network.
Identify the statement that holds true in this scenario


Options are :

  • smith has to respond to bob only from station2.
  • bob can use talk to chat with only the locally logged-in users on station1
  • smith can respond to bob from any machine within the network. (Correct)
  • bob can use only the login name to send a message to smith using talk

Answer : smith can respond to bob from any machine within the network.

A printer has been connected to the single available port. You execute the following command at
the prompt:
echo "This is a simple test" > /dev/lp0
What can you infer from the command?


Options are :

  • The text is simply echoed on to the standard output device
  • The text is saved in the /dev/lp0 file
  • The text will not be printed because the printer has not been mentioned explicitly on the command line
  • The text will be printed by the printer attached to/dev/lp0. (Correct)

Answer : The text will be printed by the printer attached to/dev/lp0.

As a root user you execute the commands as shown below:
[root@station1]# a=$((10 % 4 + 6 * 2))
[root@station1]# echo $a
What would be the output of the echo statement?


Options are :

  • 12
  • 2
  • 14 (Correct)
  • 10

Answer : 14

Which two statements are true about Regular Expressions? (Choose two.)
A. They are build upon expressions that match multiple characters.
B. They can be used only by commands, not programming languages.
C. They help most characters, letters, and numbers match themselves.
D. They supports "<" and ">" at the beginning and end of sentences only.
E. They accept text patterns from STDIN, from a network connection or from a user supplied input.


Options are :

  • A,B
  • B,C
  • C,E (Correct)
  • C,D

Answer : C,E

Match the following arguments with their actions when used with the find command:
1) -print a) Allows a command to be run against each matching file
2) -ls b) Is the default action and displays matches
3) -exec c) Displays full details on matches
4) -ok d) Can be used when you want a confirmation prompt


Options are :

  • 1-c, 2-a, 3-b, 4-d
  • 1-b, 2-c, 3-a, 4-d (Correct)
  • 1-b, 2-a, 3-d, 4-c
  • 1-c, 2-d, 3-a, 4-b

Answer : 1-b, 2-c, 3-a, 4-d

Which statement is true about the privileges granted to a user with the UID of 0?


Options are :

  • Privileges are granted as per the permissions set on every file and device known to the system.
  • The system ignores privileges to modify software installed on the system
  • Privileges are granted only to read most of the configuration files and documentation files in the system directories, not modify them
  • The system ignores all permissions when responding to commands from the user and provides read and write permissions to every file and device known to the system. (Correct)

Answer : The system ignores all permissions when responding to commands from the user and provides read and write permissions to every file and device known to the system.

You have logged in to your Linux box as a normal user with the default desktop. After working for
a while, you plan to change your desktop to KDE. How would you change the desktop?


Options are :

  • by configuring the /etc/X11/xorg.conf file
  • by configuring the /etc/sysconfig/desktop file
  • by configuring the /etc/X11/prefdm file
  • by using the switchdesk command with KDE as the argument (Correct)

Answer : by using the switchdesk command with KDE as the argument

Which two statements are true about the init process? (Choose two.)
A. Process ID (PID) of init is always 0.
B. The first process spawned by the kernel is init.
C. init uses the exec() method to spawn a new process.
D. init reads the /etc/inittab file to load the default run level.


Options are :

  • D,A
  • C,D
  • B,D (Correct)
  • A,D

Answer : B,D

You execute the following two commands at the bash prompt in the same order as shown below:

[root@station2]# myexpr=$((14*18))
[root@station2]# echo $((56+$myexpr))
What would be the output of the echo command?


Options are :

  • $myexpr
  • 56
  • 308 (Correct)
  • $((56+$myexpr))
  • 252

Answer : 308

What would be the output of the nested for loop given below?
for (( i=1; i<=5; i++ ))
do
for (( j=1; j<=i; j++ ))
do
echo -n "$j"
done
echo " "
done


Options are :

  • 123451234123123412345
  • 123451234123121
  • 112123123412345 (Correct)
  • 1234512345123451234512345

Answer : 112123123412345

You have the copy of all the rpms in the /RPMS directory on your local Linux machine. After
logging in as root and changing to the /RPMS directory, you try to install the mysql package using
the rpm command. You end up with an error message as shown below:
Error: Failed dependencies: Perl(DBI) is needed by mysql.
How would you overcome this error and install mysql successfully by resolving the dependencies?


Options are :

  • by installing the software using rpm with the --aid option (Correct)
  • by installing the software using rpm with the -F option
  • by installing the software using rpm with the --force option
  • by installing the software using rpm with the --nodeps option

Answer : by installing the software using rpm with the --aid option

As user smith you want to log in to a remote machine in a securely encrypted channel. Which
utility would you use for the purpose?


Options are :

  • ssh (Correct)
  • telnet
  • rlogin
  • ftp

Answer : ssh

Identify the shareable directories according to File system Hierarchy Standard (FHS). (Choose all
that apply.)
A. /etc
B. /usr
C. /var/run
D. /var/lock
E. /var/mail
F. /etc/sysconfig


Options are :

  • C,E
  • D,F
  • B,E (Correct)
  • A,B

Answer : B,E

You executed the following command on a Linux machine:
sed s/hello/fun/g file1.txt | tr A-z -Z> file2.txt
What three things would this command do? (Choose three.)
A. Save all changes to file2.txt.
B. Translate all uppercase characters to lowercase.
C. Translate all lowercase characters to uppercase.
D. Modifies file1.txt and creates file2.txt.
E. Replace all occurrences of the entry hello with the entry fun.
F. Replace all occurrences of the entry fun with the entry hello.


Options are :

  • A,B,D
  • A,C,F
  • A,C,E (Correct)
  • A,B,C

Answer : A,C,E

You have logged in as the root user into run level 3. What happens if you execute the xinit
command?


Options are :

  • The system continues to run in runlevel 3. (Correct)
  • The system changes to runlevel 5.
  • The system changes to runlevel 4.
  • The system changes to runlevel 1 (single).

Answer : The system continues to run in runlevel 3.

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions