1Z0-409 Oracle Linux Fundamentals Practice Exam Set 5

Examine the following output:

[root@station1]ps -f
UID PID PPID C STIME TTY TIME CMD
root 3944 3820 1 03:32 tty1 01:57 -bash
root 3984 3944 0 03:32 tty1 01:57 ksh
root 3985 3984 0 03:32 tty1 01:57 ps -f
Which columns would you analyze to find the most recently invoked shell?


Options are :

  • Analyze both the UID and PPID.
  • Analyze both the UID and PID.
  • Analyze only the PPID
  • Analyze only the UID.
  • Analyze both the PID and PPID (Correct)
  • Analyze only the PID.

Answer : Analyze both the PID and PPID

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


Options are :

  • 1 1 1 1 12 2 2 2 23 3 3 3 34 4 4 4 45 5 5 5 5 (Correct)
  • 1 2 3 4 51 2 3 4 51 2 3 4 51 2 3 4 51 2 3 4 5
  • 5 5 5 5 54 4 4 4 43 3 3 3 32 2 2 2 21 1 1 1 1
  • 5 4 3 2 15 4 3 2 15 4 3 2 15 4 3 2 15 4 3 2 1

Answer : 1 1 1 1 12 2 2 2 23 3 3 3 34 4 4 4 45 5 5 5 5

User smith on station2 is trying to chat with the remote user bob on station1 using the talk
command. smith receives an error message as shown below:

[smith@station2 ~]$talk bob@station1.example.com
[No connection yet]
[ Error on read from talk daemon: Connection refused ]
[smith@station2 ~]$
What can the root user do to resolve the issue? (Choose two.)
A. let smith retry talk by reading from STDIN and sending to bob
B. let smith retry talk after changing the group of talk command to tty
C. let smith retry the talk request with UDP port 518 open on both systems
D. let smith retry talk after restarting the xinetd service with ntalk enabled on both systems
E. let smith retry talk after restarting the network service with the UDP port 517 blocked on both
systems


Options are :

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

Answer : C,D

Which three statements are true about screen? (Choose three.)
A. screen has the ability to lock a terminal.
B. screen has the ability to monitor a session.
C. screen windows do not adhere to vt100 standards.                                                                                                                              D. All windows in a screen are dependent on each other.                                                                                                                        E. Each window in a screen has its own scroll-back buffer


Options are :

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

Answer : A,B,E

Identify the two true statements about FTP servers. (Choose two.)
A. FTP servers typically listen on port 21.
B. FTP servers typically listen on port 20.
C. FTP servers send data to clients on port 21.
D. FTP servers send data to clients on port 20.
E. FTP servers do not provide anonymous login by default


Options are :

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

Answer : A,D

Match the commands with their functions:
1. make a. installs the software to the target directory specified during configure, but typically
defaults to /usr/local/subtree
2. configure script b. calls the compiler and linker as specified by the Makefile
3. make install c. creates the necessary Makefiles based on the user information


Options are :

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

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

You want to customize the default background color in an X window system using command-line
options. What would you do to achieve this task?


Options are :

  • Edit the ~/.Xauthority file.
  • Edit the ~/.Xdefaults file. (Correct)
  • Edit the ~/.Xresources file
  • Edit the ~/.xinitrc file.

Answer : Edit the ~/.Xdefaults file.

You are planning to add the new printer1 print queue and also want to make it the default print
queue. Which of the following two commands would help you achieve the task? (Choose two.)
A. lpadmin -d printer1.
B. lpadmin -x printer1.
C. lpadmin -p printer1 -E parallel:/dev/lp0.
D. lpadmin -p printer1 -E -v parallel:/dev/lp0.


Options are :

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

Answer : A,D

What is the effect of issuing ZZ and ZQ in the vi editor command mode?


Options are :

  • The command ZZ will zoom in the vi editor command mode and ZQ will zoom out the view.
  • The command ZZ will save changes and exit, whereas ZQ will exit the editor without saving changes. (Correct)
  • The command ZZ will thrash all changes, whereas ZQ will ask for confirmation before saving.
  • The command ZZ will exit the editor without saving changes, whereas ZQ will save changes and exit.

Answer : The command ZZ will save changes and exit, whereas ZQ will exit the editor without saving changes.

A printer has been configured on a Linux box in a heterogeneous network using CUPS. A user
sends a print job from a WINDOWS machine. Identify the statement that holds true in this
scenario.


Options are :

  • The user will not able to print because he/she is on a non-UNIX system
  • The user will be able to print because the printer follows the IPP standard (Correct)
  • The user will not be able to print because WINDOWS does not support CUPS by default
  • The user will not able to print because the printer is configured using CUPS

Answer : The user will be able to print because the printer follows the IPP standard

Two users, bob on station1 and smith on station2, generated a public/private key pair using sshkeygen
to enable password-less secure shell login between them. What would be their next step
to accomplish the task?


Options are :

  • Copy the key pair of bob to station2:~smith/.ssh as public and private keys
  • Copy the private key of bob to station2:~smith and vice versa.
  • Copy the public key of bob to station1:~smith/.ssh/authorized_keys and vice versa
  • Copy the private key of bob to station2:~smith/.ssh/authorized_keys and vice versa
  • Copy the public key of bob to station2:~smith/.ssh/authorized_keys and vice versa (Correct)

Answer : Copy the public key of bob to station2:~smith/.ssh/authorized_keys and vice versa

Which four statements are true about the find command in Linux? (Choose four.)
A. The user can specify how to process the files.
B. The user can specify where to search (pathname).
C. The user can specify what type of file to search for.
D. The user can specify to perform logical operations on selections.
E. The user can search and replace the contents of files with find.
F. The user cannot find recently added files or directories on the system


Options are :

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

Answer : A,B,C,D

User scott issued the following command at the bash prompt:
[scott@station1 ~]$read -t15 -n10 -s DAX
What is the purpose of issuing this command?


Options are :

  • to make the read statement provide 15 seconds to enter up to 10 characters, echoing onto to terminal, into the $DAX variable
  • to make the read statement provide 15 seconds to enter a minimum of 10 characters echoing onto the terminal
  • to make the read statement provide 15 seconds to enter a minimum of 10 characters without echoing onto the terminal
  • to make the read statement provide 15 seconds to enter up to 10 characters silently (no echo to terminal) into the $DAX variable (Correct)

Answer : to make the read statement provide 15 seconds to enter up to 10 characters silently (no echo to terminal) into the $DAX variable

Match the following shell special characters with their usage:
1) \ a) used in pairs to quote other special characters so they will not be interpreted by the shell or
to embed blanks
2) ' ? b) variable substitution
3) { } ~ c) used to escape the special meaning of the next character
4) $ d) wildcard file name expansion


Options are :

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

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

The user smith has issued the command:
cut -f1,3 -d: /etc/passwd | tr a-z A-Z > file1.txt
What could be the purpose of using this command?


Options are :

  • to map the username along with UIDs on the system in uppercase to file1.txt (Correct)
  • to map the username, UID, passwords on the system in lowercase to file1.txt
  • to map the username along with passwords on the system in uppercase to file1.txt
  • to map the username, UID, GID on the system in uppercase to file1.txt

Answer : to map the username along with UIDs on the system in uppercase to file1.txt

Observe the following while loop:
while true
do
echo " Welcome"
sleep 5
done
What does the while statement do in the script when the condition is true?


Options are :

  • It executes the echo command 5 times with a sleep time of 5 minutes
  • It executes the echo command 5 times with a sleep time of 5 seconds
  • It executes the echo command infinitely with a sleep time of 5 seconds (Correct)
  • It executes the echo command infinitely with a sleep time of 5 minutes

Answer : It executes the echo command infinitely with a sleep time of 5 seconds

smith is trying to send a message to the local user bob using the write command and he receives
an error as shown below:
[smith@station2 ~]$write bob
Write: bob has messages disabled
[smith@station2 ~]$
What could be done to overcome the error?


Options are :

  • bob should accept messages using the mesg y command. (Correct)
  • smith should indicate the terminal on which bob is logged in.
  • bob should enable talk and ntalk on his system
  • bob should set the logged in terminal to the tty group.

Answer : bob should accept messages using the mesg y command.

You have issued the following command:
mkdir -p test/a{dax,connor,bryan}g/vo{in,out,tmp}
Which of the following directories will it create? (Choose all that apply.)
A. test/voin/adaxg
B. test/adaxg/voout
C. test/aconnorg/voin
D. test/adaxnnorg/voinout
E. test/aconnoyang/vointmp


Options are :

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

Answer : B,C

The /data directory that belongs to the apps group is set with 1770 permissions. The details of the
apps group members are given below.
# groups smith bob scott
smith : smith apps
scott : scott apps
bob : bob apps
What are the effective permissions for each of these users on other users' files and directories in
the /data directory?


Options are :

  • Read permissions only because full permission is set to the owner of the files and directories only.
  • Read and write permissions on files and read, write, and execute permissions on directories.
  • Read, write, and execute permissions on files and directories
  • Read permission on files and read and execute permissions on directories. (Correct)

Answer : Read permission on files and read and execute permissions on directories.

Identify the two main branches from the UNIX family tree, where the cross-pollination between
these branches was responsible for making UNIX so powerful. (Choose two.)
A. MIT
B. GNU
C. BSD
D. POSIX
E. BESYS
F. System V


Options are :

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

Answer : C.F

Match the following Linux kernel virtual hierarchies with their content:                                                                                                  1) /proc a) Per process information directories and other tunables                                                                                                         2) /sys b) RAM drive for POSIX shared memory operations                                                                                                                       3) /dev/pts c) Kernel object data structures                                                                                                                                              4) /dev/shm d) Auto-ownership of terminals (ttys)


Options are :

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

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

As root you have changed the default login shell to one of the shells listed in /etc/shells file. Which
file entry is modified as a result of this?


Options are :

  • /etc/shells
  • /etc/passwd (Correct)
  • /etc/shadow
  • /etc/default/useradd

Answer : /etc/passwd

A new user smith wants to customize the bourne shell by creating a new alias for the ls -l
command. He wants to make the new alias persistent across logouts and also reboots. What
could be done to make the new alias persistent only for smith?


Options are :

  • Add the new alias to ~/.profile (Correct)
  • Add the new alias to /etc/profile.
  • Add the new alias to ~/bash_profile
  • Add the new alias to ~/.bashrc

Answer : Add the new alias to ~/.profile

Which command gives the following output?
Date 03/12/2007, Time 12:00:01 AM


Options are :

  • echo "Date date +%x , Time date +%r "
  • echo "Date `date +%r` , Time `date +%x` "
  • echo "Date `date +%x` , Time `date +%r` " (Correct)
  • echo "Date `time +%x` , Time `time +%r` "

Answer : echo "Date `date +%x` , Time `date +%r` "

Note the command given below:
ls -l | grep hello\.gif
Which statement is true about this command?


Options are :

  • It will return an error because an escape character \ is used
  • It will long-list the hello.gif, hello-gif files or any file in the hello? gif format (Correct)
  • It will long-list the file hello.gif.
  • It will long-list the files in the hello*gif format from the current working directory

Answer : It will long-list the hello.gif, hello-gif files or any file in the hello? gif format

What are the improvements of vim over vi? (Choose all that apply.)
A. multi-level undo
B. online help system
C. command-line completion
D. multiple windows and buffers
E. supports using arrow keys in command mode
F. search and replace operations in command mode


Options are :

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

Answer : A,B,C,D

Which command is used for compilation when installing software from the source code?


Options are :

  • ./configure
  • make install
  • install
  • make (Correct)

Answer : make

Which command would you use to save the name of all the users in your system in alphabetical
order to a newfile file after removing the duplicate entries?


Options are :

  • cut -f1 -d: /etc/passwd | sort -d | uniq > newfile (Correct)
  • cut -f1 -d: < /etc/passwd | sort | uniq | less < newfile
  • cut -f1 -d: /etc/passwd | sort | uniq | > newfile
  • cut -f1 -d: /etc/passwd | sort -a | uniq | newfile

Answer : cut -f1 -d: /etc/passwd | sort -d | uniq > newfile

The user smith wants to display the total number of lines that are 4 characters (letters and digits)
long or more from the file1.txt file. Which regular expression or command should smith use?


Options are :

  • egrep "^[[:alnum:]]{4,}$" file1.txt | wc -c
  • egrep "^[[:alnum:]]{4,}$" file1.txt | wc -l (Correct)
  • egrep "^[[:alpha:]]{4,}$" file1.txt | wc -l
  • egrep "^[[:alpha:]]{4,}$" file1.txt | wc -w

Answer : egrep "^[[:alnum:]]{4,}$" file1.txt | wc -l

The user scott tries to create a directory hierarchy and encounters the following error:
[scott@server1 tmp]$ mkdir test/test1/stored/all
mkdir: cannot create directory `test/test1/stored/all`: No such file or directory
[scott@server1 tmp]$pwd
/tmp
Which two commands can the user scott use to create the directory hierarchy successfully?
(Choose two.)
A. mkdir /test/test1/stored/all
B. mkdir -p test/test1/stored/all
C. mkdir -r test/test1/stored/all
D. mkdirhier /test/test1/stored/all
E. mkdir -r /tmp/test/test1/stored/all
F. mkdirhier /tmp/test/test1/stored/all


Options are :

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

Answer : B,F

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions