Which of the following crontab entries will execute myscript at 30 minutes past every hour on Sundays?
The correct crontab entry for executing myscript at 30 minutes past every hour on Sundays is D. 30 0-23 * * 0 myscript. This is because the crontab format consists of six fields: minute, hour, day of month, month, day of week, and command. The values for each field can be:
A single number, such as 5 or 10.
A range of numbers, such as 1-5 or 10-15.
A list of numbers separated by commas, such as 1,3,5 or 10,12,14.
An asterisk (*), which means all possible values for that field.
A step value, which means every nth value for that field, such as */5 or 10-20/2.
The day of week field can be either a number from 0 to 6, where 0 and 7 are Sunday, or a three-letter abbreviation, such as SUN or MON. The month field can be either a number from 1 to 12, or a three-letter abbreviation, such as JAN or FEB.
In this case, the crontab entry D. 30 0-23 * * 0 myscript means:
30: Execute the command at the 30th minute of every hour.
0-23: Execute the command for every hour from 0 (midnight) to 23 (11 PM).
*: Execute the command for every day of the month, regardless of the month.
*: Execute the command for every month, regardless of the year.
0: Execute the command only on Sundays.
The other options are either incorrect or do not match the requirement. For example, option A. 0 * * * 30 myscript means:
0: Execute the command at the 0th minute of every hour.
*: Execute the command for every hour of the day.
*: Execute the command for every day of the month, regardless of the month.
*: Execute the command for every month, regardless of the year.
30: Execute the command only on the 30th day of the week, which is invalid.
Crontab Explained in Linux [With Examples]
Why is /etc/shadow not world readable if the passwords are stored in an encrypted fashion?
Which of the following commands puts the output of the command date into the shell variable mydate?
(date)'ComprehensiveThecorrectwaytoputtheoutputofthecommanddateintotheshellvariablemydateistousecommandsubstitutionwiththesyntax(command). This will execute the command in a subshell and replace the expression with its standard output. The double quotes around the expression will prevent word splitting and globbing of the output. The other options are incorrect because they will either assign a literal string to the variable, use an invalid syntax, or try to execute the command as an arithmetic expression. Reference:
[LPI Linux Essentials - Topic 105: Shells, Scripting and Data Management]
[LPI Linux Administrator - Exam 102 Objectives - Topic 105: Shells and Shell Scripting]
Which of the following IPv4 networks are reserved by IANA for private address assignment and private routing? (Choose THREE correct answers.)
10.0.0.0 - 10.255.255.255 (10/8 prefix)
172.16.0.0 - 172.31.255.255 (172.16/12 prefix)
192.168.0.0 - 192.168.255.255 (192.168/16 prefix)
These address blocks are not globally routable and are intended for use within private networks, such as home, office, or campus networks. They can be assigned to any device that does not need to communicate directly with the public internet, or that can use network address translation (NAT) to do so. Private addresses allow for more efficient use of the limited IPv4 address space and reduce the need for public addresses.
The other options are not reserved for private use by IANA. Option A, 127.0.0.0/8, is reserved for loopback addresses, which are used to refer to the local host. Option C, 169.255.0.0/16, is a typo and should be 169.254.0.0/16, which is reserved for link-local addresses, which are used for automatic address configuration on a local network segment. Option F, 224.0.0.0/4, is reserved for multicast addresses, which are used for one-to-many communication.
RFC 1918: Address Allocation for Private Internets - RFC Editor
Which command can be used to investigate the properties for a particular window in X by clicking that window? (Specify ONLY the command without any path or parameters.)