LFCS Mock Exam 1

Hi,
I have been training with the first mock exam and i have encountered some issues.

question 2 : the answer check seems to be sensitive to indentation, so if the answer is written in the crontab with and an indentation different from the proposed answer (using tabs instead of spaces for example), it can come as wrong.
Still in the question 2 “cp -r /var/www/ /opt/script.sh” is considered a wrong answer and i dont understand why, cause it seems to me it does what is required in the task.

question 6 : it seems that question 6 results are overwritten by question 13, making it impossible to validate both of them.

question 13 : the use of uuid instead of device name is considered wrong in the exam correction.

I don’t know if any of you had the same issues. Maybe it is just I who did not manage to find a work-around or I didn’t read the question right, but if that’s not the case, and if there is some issues in the mock exam 1 itself, could anybody look these things up (or explain to me what I did wrong?

For Q2, your answer is certainly wrong. The script file needs to contain the command

cp -r /var/www/ /opt/www-backup

and the script will need a #! line at the top; the file will also need execute permissions.

As for Q13: and the Q6/Q13 issue – I’ll leave to someone else to answer.

Hi Rob,
Thank you for your reactivity.
For Q2, I’m sorry i made a mistake in my post. I actually wrote ‘cp -r /var/www/ /opt/www-backup’ in the script.
I’ve just tried it again, the script is good, the permissions are good, the system-wide crontab has been edited.
However the autocorrect still shows the the last part of the answer as wrong (Is system-wide cron table updated?).

I’ve made screenshots of every step. If you have a contact mail, I’ll be glad to send those captures to you.

In Mock Exam 1, the answer of the Q2 is:

cp -a /var/www/. /opt/www-backup/

image
Screenshot 2024-08-04 193000

this is a lack of clarity, what do they want ?
copy recursively ?
preserve links ?
no dereference ?

-a is the “archive” option. It recursively copies the source to the destination. It also preserves things like the dates and ownership of the source files, but typically, that’s what you want anyway.