Lab 10 - Shell Scripting Lab6
Lab 10 - Shell Scripting Lab6
Exercise 1:
Write a Shell script that backs up a directory using “tar” commands into a single
file. As part of the script, ask for input into what you want to back up, and the
output location and filename. Example:
Example Input:
Enter the directories or files for backup: /etc /var/log /home/mydirectory
What do you want to name this file (add .tar): mybackup.tar
Where do you want to backup the file: /home/myhome
Exercise 2:
Example Input:
Exercise 3:
Create a cronjob using the script from Exercise 2.