Hey there,
I'm attempting to create a shell script using Ubuntu that will take one optional argument (which in this case is a path to a directory to backup) and will back up (by using the tar command) the chosen directory which is the /home. And i want, after tar'ing the home directory, for it to save the output in /var/backups with the file name as the date and the username. I also want to create it so that if an argument to the script is not supplied, it backs up the current users home directory. I also want the script to print an error message and exits the script if the directory could not be found.
I'm very new to this so I was just hoping I could get pointed in the right direction!
Cheers.