Bash Shell Scripting - "cron" Command

Bash Shell Scripting - "cron" Command

Assessment

Interactive Video

Information Technology (IT), Architecture, Performing Arts

University

Hard

Created by

Quizizz Content

FREE Resource

This video tutorial covers the basics of scheduling jobs using Cron, focusing on crontab commands and their functionalities. It demonstrates how to create, edit, and manage crontab entries, including scheduling scripts and handling log files. The tutorial also addresses common mistakes, such as file overwriting, and provides solutions for troubleshooting script issues. Additionally, it explains how each user has their own crontab and how to manage these entries effectively.

Read more

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary purpose of the 'echo_hello' script?

To display the current date and a greeting

To list all files in a directory

To delete temporary files

To create a new directory

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What command is used to list crontab entries for a user?

crontab -e

crontab -l

crontab -r

crontab -a

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why is it important to specify the full path in a crontab entry?

To prevent syntax errors

To ensure the script runs in the correct directory

To reduce memory usage

To increase the execution speed

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the effect of using a single '>' in a crontab entry?

It deletes the file

It appends output to a file

It overwrites the file with new output

It creates a new file

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you modify a crontab entry to append output instead of overwriting?

Use '<<' instead of '>'

Use '>>' instead of '>'

Use '||' instead of '>'

Use '>' instead of '>>'

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What should be done to ensure a script runs in the intended directory?

Use absolute paths

Use environment variables

Use symbolic links

Use relative paths

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the 'dummy_script.sh' version two?

To delete files in the directory

To execute commands in the specified directory

To execute commands in the home directory

To create a backup of the directory

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?