Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a bash script to protect a directory. Your script should notify a user of

ID: 3815356 • Letter: W

Question

Write a bash script to protect a directory. Your script should notify a user of the following:

-New file was created
-Permission changes
-Ownership changes
-File size changes
-Modification date changes

Your script should have two operation modes, protect and check. Use command line flags, -p <directory> and -c <directory> to decide which mode to operate in. In protect mode, your script should create a file called .protect inside the directory you want to watch. You will use this file to check for any changes made as listed above. In check mode, your script should report any of the changes listed above.

Explanation / Answer

A) $ ls someFile writeProtectedFile $ rm someFile $ ls writeProtectedFile $ rm writeProtectedFile rm remove write-protected regular file 'writeProtectedFile'? yes $ ls

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote