What command displays all aliases defined in the current shell? (Specify the command without any path information) Which file specifies the user accounts that can NOT submit jobs via at or batch? (Provide the full path and filename) In which file, if present, must all users be listed that are allowed to use the cron scheduling system? (Specify the full name of the file, including path.) Which option in the /etc/ntp.conf file specifies an external NTP source to be queried for time information? (Specify ONLY the option without any values or parameters.) Which command is used to sync the hardware clock to the system clock? (Specify ONLY the command without any path or parameters.) Which file lists which users can execute commands using sudo? (Specify the full name of the file, including path.) What output will the following command sequence produce? echo '1 2 3 4 5 6' | while read a b c; do echo result: $c $b $a; done A. result: 3 4 5 6 2 1 B. result: 1 2 3 4 5 6 C. result: 6 5 4 D. result: 6 5 4 3 2 1 E. result: 3 2 1 When the command echo $ outputs 1, which of the following statements is true? A. It is the process ID of the echo command. B. It is the process ID of the current shell. C. It is the exit value of the command executed immediately before echo. D. It is the exit value of the echo command. Which command makes the shell variable named VARIABLE visible to subshells? A. export $VARIABLE B. export VARIABLE C. set $VARIABLE D. set VARIABLE E. env VARIABLE What output will the command seq 10 produce? A. A continuous stream of numbers increasing in increments of 10 until stopped. B. The numbers 1 through 10 with one number per line. C. The numbers 0 through 9 with one number per line. D. The number 10 to standard output. After issuing: function myfunction { echo $1 $2 ; } in Bash, which output does: myfunction A B C Produce? A. A B B. A B C C. A C D. B C E. C B A Which of the following files, when existing, affect the behavior of the Bash shell? (Choose TWO correct answers.) A. ~/.bashconf B. ~/.bashrc C. ~/.bashdefaults D. ~/.bash_etc E. ~/.bash_profile What is the difference between the commands test -e path and test -f path? A. They are equivalent options with the same behaviour. B. The -f option tests for a regular file. The -e option tests for an empty file. C. Both options check the existence of the path. The -f option also confirms that it is a regular file. D. The -f option tests for a regular file. The -e option tests for an executable file. How can the existing environment variable FOOBAR be suppressed for the execution of the script./myscript only? A. unset -v FOOBAR;./myscript B. set -a FOOBAR="";./myscript C. env -u FOOBAR./myscript D. env -i FOOBAR./myscript Which of the following is observed and corrected by a NTP client? A. The skew in time between the system clock and the hardware clock. B. The skew in time between the system clock and the reference clock. C. Changes in the time zone of the current computer's location. D. Adjustments needed to support Daylight Saving Time. Which of the following commands lists all defined variables and functions within Bash? A. env B. set C. env -a D. echo $ENV What is the purpose of the file /etc/profile? A. It contains the welcome message that is displayed after login. B. It contains security profiles defining which users are allowed to log in. C. It contains environment variables that are set when a user logs in. D. It contains default application profiles for users that run an application for the first time. Which of the following are requirements in order to run a shell script like a regular command from anywhere in the filesystem? (Choose THREE correct answers.) A. The user issuing the command must be in the group script. B. The script file must be found in the $PATH. C. The script file must have the executable permission bit set. D. The script must begin with a shebang-line (#!) that points to the correct interpreter. E. The file system on which the script resides must be mounted with the option scripts. Which of the following steps prevents a user from obtaining an interactive login session? A. Run the command chsh -s /bin/false with the user name. B. Set the UID for the user to 0. C. Remove the user from the group staff. D. Add the user to /etc/noaccess. E. Create a .nologin file in the user's home directory. Which of the following tasks can be accomplished using the command date? (Choose TWO correct answers.) A. Synchronize the hardware and system clocks. B. Output date and time in different formats. C. Set the system clock. D. Set the hardware clock. E. Update the time via NTP. What is true about the ntpdate command? A. It is the primary management command for the NTP time server. B. It updates the local system's date (i.e. day, month and year) but not the time (i.e. hours, minutes, seconds). C. It queries one or more NTP time servers and adjusts the system time accordingly. D. It sends the local system time to one or many remote NTP time servers for redistribution. E. It can be used by any user to set the user clock independently of the system clock. Which of the following fields are available in both the global /etc/crontab file as well as in user- specific crontab files? (Select TWO correct answers) A. Year B. Minute C. Username D. Command In case neither cron.allow nor cron.deny exist in /etc/, which of the following is true? A. Without additional configuration, no users may have user specific crontabs. B. Without additional configuration, all users may have user specific crontabs. C. The cron daemon will refuse to start and report missing files in the system's logfile. D. When a user creates a user specific crontab the system administrator must approve it explicitly. Where are user specific crontabs stored? A. In the database file /etc/crontab.db which is shared by all users. B. As individual per-user files within /var/spool/cron. C. As individual per-user files in /etc/cron.user.d. D. In the .crontab file in the user's home directory. E. In the file /var/cron/user-crontab which is shared by all users. Each entry in a crontab must end with what character? A. Tab B. Space C. Backslash D. Newline To prevent a specific user from scheduling tasks with at, what should the administrator do? A. Add the specific user to /etc/at.allow file. B. Add the specific user to [deny] section in the /etc/atd.conf file. C. Add the specific user to /etc/at.deny file. D. Add the specific user to nojobs group. E. Run the following: atd --deny [user]. Which of the following crontab entries will execute myscript at 30 minutes past every hour on Sundays? A. 0 * * * 30 myscript B. 30 * * * 6 myscript C. 30 0 * * 0 myscript D. 30 0-23 * * 0 myscript E. 0 0-23 * * 30 myscript Which of the following files assigns a user to its primary group? A. /etc/pgroup B. /etc/shadow C. /etc/group D. /etc/passwd E. /etc/gshadow Which of the following tasks can be accomplished using the command date? (Choose TWO correct answers.) A. Synchronize the hardware and system clocks. B. Output date and time in different formats. C. Set the system clock. D. Set the hardware clock. E. Update the time via NTP. Why is the correct configuration of a system's time zone important? A. Because the conversion of Unix timestamps to local time relies on the time zone configuration. B. Because the time zone is saved as part of the modification times of files and cannot be changed after a file is created. C. Because the environment variables LANG and LC_MESSAGES are, by default, set according to the time zone. D. Because NTP chooses servers nearby based on the configured time zone. Which of the following is observed and corrected by a NTP client? A. The skew in time between the system clock and the hardware clock. B. The skew in time between the system clock and the reference clock. C. Changes in the time zone of the current computer's location. D. Adjustments needed to support Daylight Saving Time. What output will the following command produce? seq 1 5 20 A. 1 B. 1 C. 1 D. 2 E. 5 ====== respuestas ====== What command displays all aliases defined in the current shell? (Specify the command without any path information) Correct Answer: alias, alias -p Which file specifies the user accounts that can NOT submit jobs via at or batch? (Provide the full path and filename) Correct Answer: /etc/at.deny In which file, if present, must all users be listed that are allowed to use the cron scheduling system? (Specify the full name of the file, including path.) Correct Answer: /etc/cron.allow Which option in the /etc/ntp.conf file specifies an external NTP source to be queried for time information? (Specify ONLY the option without any values or parameters.) Correct Answer: server Which command is used to sync the hardware clock to the system clock? (Specify ONLY the command without any path or parameters.) Correct Answer: hwclock, /sbin/hwclock, /usr/sbin/hwclock Which file lists which users can execute commands using sudo? (Specify the full name of the file, including path.) Correct Answer: /etc/sudoers What output will the following command sequence produce? echo '1 2 3 4 5 6' | while read a b c; do echo result: $c $b $a; done A. result: 3 4 5 6 2 1 B. result: 1 2 3 4 5 6 C. result: 6 5 4 D. result: 6 5 4 3 2 1 E. result: 3 2 1 Correct Answer: A When the command echo $ outputs 1, which of the following statements is true? A. It is the process ID of the echo command. B. It is the process ID of the current shell. C. It is the exit value of the command executed immediately before echo. D. It is the exit value of the echo command. Correct Answer: C Which command makes the shell variable named VARIABLE visible to subshells? A. export $VARIABLE B. export VARIABLE C. set $VARIABLE D. set VARIABLE E. env VARIABLE Correct Answer: B What output will the command seq 10 produce? A. A continuous stream of numbers increasing in increments of 10 until stopped. B. The numbers 1 through 10 with one number per line. C. The numbers 0 through 9 with one number per line. D. The number 10 to standard output. Correct Answer: B After issuing: function myfunction { echo $1 $2 ; } in Bash, which output does: myfunction A B C Produce? A. A B B. A B C C. A C D. B C E. C B A Correct Answer: A Which of the following files, when existing, affect the behavior of the Bash shell? (Choose TWO correct answers.) A. ~/.bashconf B. ~/.bashrc C. ~/.bashdefaults D. ~/.bash_etc E. ~/.bash_profile Correct Answer: BE What is the difference between the commands test -e path and test -f path? A. They are equivalent options with the same behaviour. B. The -f option tests for a regular file. The -e option tests for an empty file. C. Both options check the existence of the path. The -f option also confirms that it is a regular file. D. The -f option tests for a regular file. The -e option tests for an executable file. Correct Answer: C How can the existing environment variable FOOBAR be suppressed for the execution of the script./myscript only? A. unset -v FOOBAR;./myscript B. set -a FOOBAR="";./myscript C. env -u FOOBAR./myscript D. env -i FOOBAR./myscript Correct Answer: C Which of the following is observed and corrected by a NTP client? A. The skew in time between the system clock and the hardware clock. B. The skew in time between the system clock and the reference clock. C. Changes in the time zone of the current computer's location. D. Adjustments needed to support Daylight Saving Time. Correct Answer: B Which of the following commands lists all defined variables and functions within Bash? A. env B. set C. env -a D. echo $ENV Correct Answer: B What is the purpose of the file /etc/profile? A. It contains the welcome message that is displayed after login. B. It contains security profiles defining which users are allowed to log in. C. It contains environment variables that are set when a user logs in. D. It contains default application profiles for users that run an application for the first time. Correct Answer: C Which of the following are requirements in order to run a shell script like a regular command from anywhere in the filesystem? (Choose THREE correct answers.) A. The user issuing the command must be in the group script. B. The script file must be found in the $PATH. C. The script file must have the executable permission bit set. D. The script must begin with a shebang-line (#!) that points to the correct interpreter. E. The file system on which the script resides must be mounted with the option scripts. Correct Answer: BCD Which of the following steps prevents a user from obtaining an interactive login session? A. Run the command chsh -s /bin/false with the user name. B. Set the UID for the user to 0. C. Remove the user from the group staff. D. Add the user to /etc/noaccess. E. Create a .nologin file in the user's home directory. Correct Answer: A Which of the following tasks can be accomplished using the command date? (Choose TWO correct answers.) A. Synchronize the hardware and system clocks. B. Output date and time in different formats. C. Set the system clock. D. Set the hardware clock. E. Update the time via NTP. Correct Answer: BC What is true about the ntpdate command? A. It is the primary management command for the NTP time server. B. It updates the local system's date (i.e. day, month and year) but not the time (i.e. hours, minutes, seconds). C. It queries one or more NTP time servers and adjusts the system time accordingly. D. It sends the local system time to one or many remote NTP time servers for redistribution. E. It can be used by any user to set the user clock independently of the system clock. Correct Answer: C Which of the following fields are available in both the global /etc/crontab file as well as in user- specific crontab files? (Select TWO correct answers) A. Year B. Minute C. Username D. Command Correct Answer: BD In case neither cron.allow nor cron.deny exist in /etc/, which of the following is true? A. Without additional configuration, no users may have user specific crontabs. B. Without additional configuration, all users may have user specific crontabs. C. The cron daemon will refuse to start and report missing files in the system's logfile. D. When a user creates a user specific crontab the system administrator must approve it explicitly. Correct Answer: A Where are user specific crontabs stored? A. In the database file /etc/crontab.db which is shared by all users. B. As individual per-user files within /var/spool/cron. C. As individual per-user files in /etc/cron.user.d. D. In the .crontab file in the user's home directory. E. In the file /var/cron/user-crontab which is shared by all users. Correct Answer: B Each entry in a crontab must end with what character? A. Tab B. Space C. Backslash D. Newline Correct Answer: D To prevent a specific user from scheduling tasks with at, what should the administrator do? A. Add the specific user to /etc/at.allow file. B. Add the specific user to [deny] section in the /etc/atd.conf file. C. Add the specific user to /etc/at.deny file. D. Add the specific user to nojobs group. E. Run the following: atd --deny [user]. Correct Answer: C Which of the following crontab entries will execute myscript at 30 minutes past every hour on Sundays? A. 0 * * * 30 myscript B. 30 * * * 6 myscript C. 30 0 * * 0 myscript D. 30 0-23 * * 0 myscript E. 0 0-23 * * 30 myscript Correct Answer: D Which of the following files assigns a user to its primary group? A. /etc/pgroup B. /etc/shadow C. /etc/group D. /etc/passwd E. /etc/gshadow Correct Answer: D Which of the following tasks can be accomplished using the command date? (Choose TWO correct answers.) A. Synchronize the hardware and system clocks. B. Output date and time in different formats. C. Set the system clock. D. Set the hardware clock. E. Update the time via NTP. Correct Answer: BC Why is the correct configuration of a system's time zone important? A. Because the conversion of Unix timestamps to local time relies on the time zone configuration. B. Because the time zone is saved as part of the modification times of files and cannot be changed after a file is created. C. Because the environment variables LANG and LC_MESSAGES are, by default, set according to the time zone. D. Because NTP chooses servers nearby based on the configured time zone. Correct Answer: A Which of the following is observed and corrected by a NTP client? A. The skew in time between the system clock and the hardware clock. B. The skew in time between the system clock and the reference clock. C. Changes in the time zone of the current computer's location. D. Adjustments needed to support Daylight Saving Time. Correct Answer: B What output will the following command produce? seq 1 5 20 A. 1 B. 1 C. 1 D. 2 E. 5 Correct Answer: A ¿? Si??