Assignment 1: Bash Scripting

QUESTION 2
Write a bash script that monitors in real time the sizes of regular files in a specified folders. The folder name should be provided as an argument when calling the script. The folder must exist in the same working directory where the script is located. Ensure that the script is properly called with an argument. Then monitor the file sizes and log in a separate file the timestamp and the name of the file when its size goes above 4Kbytes. In such a case, archive and backup the file with the timestamp as part of the archives name and replace the file with a new and empty one. Exclude the log file from the monitoring. To test the script, manually create a folder with a mixture of sub-folders and files. When the script is running, open the files in your test folder and be adding content to it to increase the file size and check if your script could monitor the changes. (You are free to automate the testing). Properly comment your code.

QUESTION 3
Write a bash script that automates the creation and deletion of user accounts. The script should accept as input argument, a file containing a list of user names to be created on the system. Enforce that the user provides this input file while executing the script. The script should check if the usernames already exist on the system before creating the accounts. If a user account exit, the script should notify the user and skip that user name to the next one. Make sure to create a home directory as well. When the input list has been exhausted and all the user account created, output the content of /etc/passwd file and /home directory to the terminal for verification. In a next step, the script should ask if user wants to delete the newly created accounts? If yes, the script should delete the accounts including their home directories and output again the content of /etc/passwd file and /home directory for verification. If no, the script should terminate with appropriate message. This script is to be tested/executed as a root user. Properly comment your code.

#write essay #research paper #blog writing #article writing #academic writer #reflective paper #essay pro #types of essays #write my essay #reflective essay #paper writer #essay writing service #essay writer free #essay helper #write my paper #assignment writer #write my essay for me #write an essay for me #uk essay #thesis writer #dissertation writing services #writing a research paper #academic essay #dissertation help #easy essay #do my essay #paper writing service #buy essay #essay writing help #essay service #dissertation writing #online essay writer #write my paper for me #types of essay writing #essay writing website #write my essay for free #reflective report #type my essay #thesis writing services #write paper for me #research paper writing service #essay paper #professional essay writers #write my essay online #essay help online #write my research paper #dissertation writing help #websites that write papers for you for free #write my essay for me cheap #pay someone to write my paper #pay someone to write my research paper #Essaywriting #Academicwriting #Assignmenthelp #Nursingassignment #Nursinghomework #Psychologyassignment #Physicsassignment #Philosophyassignment #Religionassignment #History #Writing #writingtips #Students #universityassignment #onlinewriting #savvyessaywriters #onlineprowriters #assignmentcollection #excelsiorwriters #writinghub #study #exclusivewritings #myassignmentgeek #expertwriters #art #transcription #grammer #college #highschool #StudentsHelpingStudents #studentshirt #StudentShoe #StudentShoes #studentshoponline #studentshopping #studentshouse #StudentShoutout #studentshowcase2017 #StudentsHub #studentsieuczy #StudentsIn #studentsinberlin #studentsinbusiness #StudentsInDubai #studentsininternational