1Z0-409 Oracle Linux Fundamentals Practice Exam Set 7

Match the positional parameter with its functionality.
1.$0 a. lists the number of arguments passed
2. $# b. name of the shell script
3. $@ c. lists the arguments passed


Options are :

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

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

A group of users on a Linux system have a common working directory /documents with 1770
permissions. You have a scenario where you have to let all users of the group delete any file or
directory in /documents. What would you do in this situation to let them delete any file or directory
in /documents?


Options are :

  • Set rwx permissions for others on /documents.
  • Set 777 permissions on all files and directories in /documents
  • Remove sticky bit on the directory (Correct)
  • Set 3770 permissions on /documents

Answer : Remove sticky bit on the directory

Identify the XDMCP query type in which a client machine connects to the first available machine to
get a list of all machines to which it can connect.


Options are :

  • Indirect (Correct)
  • Parallel
  • Broadcast
  • Direct

Answer : Indirect

You have set HISTCONTROL=ignoreboth. What are the implications of this setting on history?


Options are :

  • It ignores duplicates but saves the commands prefixed with space.
  • It ignores both the duplicate commands and commands prefixed with a space (Correct)
  • It saves both duplicates and commands prefixed with a space.
  • It ignores commands prefixed with a space but saves duplicates

Answer : It ignores both the duplicate commands and commands prefixed with a space

As a user smith you executed the following command to change the default priority of the date
command:
[smith@station2 ~]$ nice --10 date
nice : cannot set priority : Permission denied
[smith@station2 ~]$
What could be the reason for the error message?


Options are :

  • smith does not have the SUID bit set on nice.
  • smith does not have the permission to change the nice value from the default to a lower value (Correct)
  • smith does not have the execute permission on nice
  • smith does not have the permission to change the nice value from the default to a higher value

Answer : smith does not have the permission to change the nice value from the default to a lower value

The root user tries to create the hard link link1 to /root/textfile in /boot and receives the error:
[root@server1 ~]# ln textfile /boot/link1
ln: creating hardlink `/boot/link' to `textfile': Invalid cross-device link
Which two statements are true? (Choose two.)
A. Hard links cannot span file systems.
B. /boot file system does not exist or it is not mounted.
C. /boot can occupy files that are required at boot time only.
D. Hard links cannot be created to the nonexistent file /root/textfile.
E. Hard link is supposed to be another physical presence of a file on the same file system.


Options are :

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

Answer : A,E

Which command could user smith use to change the time stamps of the file1 and dir1 given below,
to the current system time?
[smith@server1 ~]$ ls -l
-rw-rw-r-- 1 smith smith 6 Jan 20 10:01 file1
drwxrwxr-x 2 smith smith 4096 Jan 20 10:54 dir1


Options are :

  • touch (Correct)
  • time
  • file
  • cat
  • stat

Answer : touch

As the user smith you issue the following command:
[smith@station1 ~]$ scp file1 bob@station1:~bob
Enter passphrase for key '/home/smith/.ssh/id_dsa': file1 100% 0 0.0KB/s 00:00
[smith@station1 ~]$
What is the authentication method used in the node?


Options are :

  • Host-based authentication
  • Password authentication
  • Public Key Authentication (Correct)
  • KeyBoard-Interactive Authentication
  • Challenge Response Authentication

Answer : Public Key Authentication

As a root user you want to modify the default shell prompt to include the hostname as part of the
prompt. Also you want the change in the hostname to reflect on the prompt immediately. Which
option would help you achieve this task?


Options are :

  • PS2='[`hostname`]'
  • PS1='[`hostname`]' (Correct)
  • PS1=''[`hostname`]''
  • PS2=''[`hostname`]''

Answer : PS1='[`hostname`]'

You have downloaded a file called firefox.tar.gz. Which of the following commands could help you
to extract the files from this tar file? (Choose all that apply.)
A. tar xjf firefox.tar.gz
B. tar xzf firefox.tar.gz
C. tar -xvjf firefox.tar.gz
D. tar --gzip -xf firefox.tar.gz


Options are :

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

Answer : B,D

As a root user you have issued the following commands at the bash prompt:
[root@station1 ~]#set a b c d e f g h i j k l m n o p q r s t u v w x y z
[root@station1 ~]#shift 9
[root@station1 ~]#echo ${10}
What would be the output of the echo command?


Options are :

  • It will print the letter s. (Correct)
  • It will print the letter j.
  • It will print $1 followed by the literal 0.
  • It will print ${10} onto the standard output

Answer : It will print the letter s.

Identify two correct statements about the cp command in association with the inode table. (Choose
two.)
A. Deletes the old directory entry with the old file name
B. Allocates a free inode number placing a new entry in the inode table
C. Has no impact on the inode table (except for time stamp or location of data on disk)
D. Creates a new directory entry that associates with a new name and inode number


Options are :

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

Answer : B,D

As a system administrator, you have created the /public directory. The permission to the directory
is shown below:
[root@server1 ~]# ll -d /public/
drwxr-xr-x 3 root root 4096 Dec 17 04:35 /public/
You have a requirement that all the normal users in the system should be able to create files in the /public directory, but they should not be able to delete one another's files. Which command will achieve this task?


Options are :

  • chmod 2777 /public
  • chmod 777 /public
  • chmod 1777 /public (Correct)
  • chmod 4777 /public

Answer : chmod 1777 /public

You receive a file that has the extension .tar and you are unable to open it. How would you find
what type of file it is?


Options are :

  • By issuing the md5 command
  • By issuing the file command (Correct)
  • By issuing -t switch with the tar command
  • By issuing the strings command

Answer : By issuing the file command

Match the query commands with their functions.
1. rpm -qa a. lists packages on which the package depends
2. rpm -qi b. lists all packages installed on the system
3. rpm -qR c. list of all the files in the package
4. rpm -ql d. information about the package


Options are :

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

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

Which statement is true about symbolic link?


Options are :

  • It cannot reference directories.
  • It cannot span file systems
  • It can reference nonexistent files. (Correct)
  • It does not occupy storage space (that is, blocks).

Answer : It can reference nonexistent files.

As a root user, you have configured a file system using AutoFS with the default settings. You
changed to one of the directories under AutoFS control at the tty1 terminal and started working at
the tty2 terminal. What is the status of the file system mounted in the tty1 terminal after the idle
time as mentioned in the /etc/auto.master file?


Options are :

  • The file system gets unmounted automatically after left idle for 5 minutes irrespective of the AutoFS configuration file time settings
  • The file system is unmounted the moment you start working at the tty2 terminal.
  • The file system remains mounted as long as the system is up and running
  • The file system remains mounted until you logout from tty1 terminal. (Correct)

Answer : The file system remains mounted until you logout from tty1 terminal.

Identify the true statements about the nice value. (Choose two.)

A. It only accepts priority values less than 19.
B. By default it reduces the priority of a process by 10.
C. A higher nice value makes a process run at a lower priority.
D. By default a normal user can make a process run at a higher priority.


Options are :

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

Answer : B,C

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions