Scripting Assignment | Online Homework Help
NOTE: This is a little different than what is described in video.
Create one script that does two things. It creates a backup of your directory or performs a security check to be sure the files have not been changed without you knowing.
Your script must do the following:
1) If the user indicates option 1 on the command line, it performs a backup of your home directory structure.
2) If the user indicates option 2 on the command line, to does a security check. The script checks if any files in a directory have changed (use sha1sum and diff). You will need to create a temporary file to hold the new data so you can compare the two. You code should also do the following:
- Create a maintenance log of who (username) and when (date) the hash checks were completed. Store the date and name in a file called maintenance. If the file already exists the code should append to the end.
- Make sure you check to be sure if you can read the file and you can write to it before doing it. If you can’t print out an error.
- The script should print out the name of the file(s) that changed and its old and new hash.
- Prove that your code works:
- Show maintenance log
- Show all conditions including error conditions working
We've got everything to become your favourite writing service
Money back guarantee
Your money is safe. Even if we fail to satisfy your expectations, you can always request a refund and get your money back.
Confidentiality
We don’t share your private information with anyone. What happens on our website stays on our website.
Our service is legit
We provide you with a sample paper on the topic you need, and this kind of academic assistance is perfectly legitimate.
Get a plagiarism-free paper
We check every paper with our plagiarism-detection software, so you get a unique paper written for your particular purposes.
We can help with urgent tasks
Need a paper tomorrow? We can write it even while you’re sleeping. Place an order now and get your paper in 8 hours.
Pay a fair price
Our prices depend on urgency. If you want a cheap essay, place your order in advance. Our prices start from $11 per page.