0
0
Linux CLIscripting~10 mins

Editing crontab (crontab -e) in Linux CLI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to open the crontab editor for the current user.

Linux CLI
crontab [1]
Drag options to blanks, or click blank then click option'
A-r
B-l
C-e
D-v
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-l' which lists the crontab instead of editing it.
Using '-r' which removes the crontab instead of editing.
2fill in blank
medium

Complete the crontab line to run a script every day at 5 AM.

Linux CLI
[1] 5 * * * /home/user/script.sh
Drag options to blanks, or click blank then click option'
A0
B5
C30
D15
Attempts:
3 left
💡 Hint
Common Mistakes
Putting 5 in the minutes field instead of the hour field.
Using 30 or 15 which run at 5:15 or 5:30 instead of 5:00.
3fill in blank
hard

Fix the error in this crontab line to run a backup script every Sunday at midnight.

Linux CLI
0 0 * * [1] /usr/local/bin/backup.sh
Drag options to blanks, or click blank then click option'
A7
Bsun
C1
D0
Attempts:
3 left
💡 Hint
Common Mistakes
Using 7 which may not be supported on all systems.
Using 0 which can mean Sunday but is less readable.
4fill in blank
hard

Fill both blanks to run a cleanup script every 15 minutes.

Linux CLI
*/[1] * * * [2] /home/user/cleanup.sh
Drag options to blanks, or click blank then click option'
A15
B*
D*/15
Attempts:
3 left
💡 Hint
Common Mistakes
Using '*/15' in the hour field which is invalid.
Using '*' in the minutes field which runs every minute.
5fill in blank
hard

Fill all three blanks to run a script at 2:30 PM on the first day of every month.

Linux CLI
[1] [2] [3] * * /home/user/monthly_report.sh
Drag options to blanks, or click blank then click option'
A30
B14
C1
D0
Attempts:
3 left
💡 Hint
Common Mistakes
Using 2 instead of 14 for the hour field.
Using 0 for the day of month which is invalid.