Given a log file loga.log with timestamps of the format DD/MM/YYYY:hh:mm:ss, which command filters out all log entries in the time period between 8:00 am and 8:59 am? grep -E ':08:[09]+:[09]+' loga.log
Correct Answer: D
Question 42
Which of the following commands loads a kernel module along with any required dependency modules?
Correct Answer: B
Explanation/Reference:
Question 43
How many fields are in a syntactically correct line of /etc/fstab?
Correct Answer: D
Explanation A syntactically correct line of /etc/fstab must have six fields, separated by whitespaces or tabs. The fields are as follows: * The device file, UUID or label or other means of locating the partition or data source. * The mount point, which is the directory where the device is/will be mounted. * The file system type, which specifies the type of the file system. * The mount options, which are a comma-separated list of options that control how the file system is mounted and accessed. * The dump flag, which is a number that indicates whether the file system should be backed up by the dump utility. This is an outdated method and should not be used. * The fsck order, which is a number that indicates the order in which the file system should be checked by the fsck utility at boot time. A value of 0 means no check, a value of 1 means the root file system, and a value of 2 or higher means other file systems. For example, a line of /etc/fstab could look like this: UUID=80b496fa-ce2d-4dcf-9afc-bcaa731a67f1 /mnt/example ext4 defaults 0 2 This means that the file system with the UUID 80b496fa-ce2d-4dcf-9afc-bcaa731a67f1 is mounted on /mnt/example, has the type ext4, uses the default mount options, is not backed up by dump, and is checked by fsck after the root file system. References: * How fstab works - introduction to the /etc/fstab file on Linux * /etc/fstab - Gentoo wiki * fstab(5) - Linux manual page * /etc/fstab file | Linux# - Geek University
Question 44
Given the following two symbolic links in a System V init configuration: /etc/rc1.d/K01apache2 /etc/rc2.d/S02apache2 When are the scripts executed that are referenced by these links? (Choose two.)
Correct Answer: A,C
Explanation/Reference:
Question 45
When starting a program with the nice command without any additional parameters, which nice level is set for the resulting process?
Correct Answer: C
Explanation When starting a program with the nice command without any additional parameters, the nice level is set to 10 for the resulting process. This means that the process will have a lower priority than the default value of 0, and will be more willing to yield CPU time to other processes. The nice command can also take an optional argument -n followed by a number, which specifies the increment or decrement of the nice value from the default value of 0. For example, the command: nice -n 5 /usr/bin/prog will start the /usr/bin/prog process with a nice value of 5, which means a lower priority than the default. Similarly, the command: nice -n -5 /usr/bin/prog will start the /usr/bin/prog process with a nice value of -5, which means a higher priority than the default. If the -n argument is omitted, the nice command will assume a default increment of 10. For example, the command: nice /usr/bin/prog will start the /usr/bin/prog process with a nice value of 10, which means a very low priority. Note that only the root user can start a process with a negative nice value, as this requires special privileges. References: * [LPI Exam 101 Detailed Objectives], Topic 103: GNU and Unix Commands, Objective 103.6: Modify process execution priorities, Weight: 2, Key Knowledge Areas: Know the default priority of a job that is created. * How to Set Process Priorities With nice and renice on Linux, Topic: The nice Command.