+1(316)4441378

+44-141-628-6690

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.

 

You can place an order similar to this with us. You are assured of an authentic custom paper delivered within the given deadline besides our 24/7 customer support all through.

 

Latest completed orders:

# topic title discipline academic level pages delivered
6
Writer's choice
Business
University
2
1 hour 32 min
7
Wise Approach to
Philosophy
College
2
2 hours 19 min
8
1980's and 1990
History
College
3
2 hours 20 min
9
pick the best topic
Finance
School
2
2 hours 27 min
10
finance for leisure
Finance
University
12
2 hours 36 min
[order_calculator]