Consider the following commands: What is displayed when this sequence of commands is executed using the bash shell?
Correct Answer: B
First line (rm file1) deletes/removes file1. Second line captures the text into file2. The first part of line 3 (cat file1) fails as the file1 does not exist. The && (AND) operator will ensure that the third line fails.The result of line 3 will be the result of first part of line 3 (cat file1). Note: cat - concatenate files and print on the standard output Note #1: A list is a sequence of one or more pipelines separated by one of the operators ';', '&', '&&', or '||', and optionally terminated by one of ';', '&', or a newline. Of these list operators, '&&' and '||' have equal precedence, followed by ';' and '&', which have equal precedence. AND and OR lists are sequences of one or more pipelines separated by the control operators '&&' and '||', respectively. AND and OR lists are executed with left associativity. An AND list has the form command1 && command2 command2 is executed if, and only if, command1 returns an exit status of zero. An OR list has the form command1 || command2 command2 is executed if, and only if, command1 returns a non-zero exit status. The return status of AND and OR lists is the exit status of the last command executed in the list. Note #2 (on exit status): Zero means command executed successfully, if exit status returns non- zero value then your command failed to execute. Reference: Bash Reference Manual, Lists of Commands
Question 147
The following image properties are displayed on your system: Which two options describe the boot environment policy property that is currently set for this image?
Correct Answer: D,F
Explanation/Reference: Explanation: Image properties described below. * be-policy Specifies when a boot environment is created during packaging operations. The following values are allowed: /default Apply the default BE creation policy: create-backup. /always-new (D, F) Require a reboot for all package operations (D) by performing them in a new BE set as active on the next boot (F). A backup BE is not created unless explicitly requested. This policy is the safest, but is more strict than most sites need since no packages can be added without a reboot.
Question 148
You notice that the /var/.dm/messages file has become very large. Typically,this is managed by a crontab entry. Which entry should be in the root's crontab file?
Correct Answer: B
This example shows how to display the default root crontab file. $ suPassword: # crontab -l #ident "@(#)root 1.19 98/07/06 SMI" /* SVr4.0 1.1.3.1 */ # # The root crontab should be used to perform accounting data collection. # # 10 3 * * * /usr/sbin/logadm 15 3 * * 0 /usr/lib/fs/nfs/nfsfind 30 3 * * * [ -x /usr/lib/gss/gsscred_clean ] && /usr/lib/gss/gsscred_clean #10 3 * * * /usr/lib/krb5/kprop_script ___slave_kdcs___
Question 149
Which two statements are true concerning the network stack on Oracle Solaris 11?
Correct Answer: A,E
Question 150
Consider the following commands: What is displayed when this sequence of commands is executed using the bash shell?
Correct Answer: B
First line (rm file1) deletes/removes file1. Second line captures the text into file2. The first part of line 3 (cat file1) fails as the file1 does not exist. The && (AND) operator will ensure that the third line fails. The result of line 3 will be the result of first part of line 3 (cat file1). Note: cat - concatenate files and print on the standard output Note #1: A list is a sequence of one or more pipelines separated by one of the operators ';', '&', '&&', or '||', and optionally terminated by one of ';', '&', or a newline. Of these list operators, '&&' and '||' have equal precedence, followed by ';' and '&', which have equal precedence. AND and OR lists are sequences of one or more pipelines separated by the control operators '&&' and '||', respectively. AND and OR lists are executed with left associativity. An AND list has the form command1 && command2 command2 is executed if, and only if, command1 returns an exit status of zero. An OR list has the form command1 || command2 command2 is executed if, and only if, command1 returns a non-zero exit status. The return status of AND and OR lists is the exit status of the last command executed in the list. Note #2 (on exit status): Zero means command executed successfully, if exit status returns non-zero value then your command failed to execute.