Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Programming Language Expert

1. Menu options

The shell script should generate a menu to allow the user to choose each option. After executing options 1­6, the
script is expected to loop back to the Menu to allow further actions.

2. a) List system users

b) List non­system users

For above 2 options, your script should automatically look in the /etc/password file for system users and non­system users.

System users and non­system users are defined in /etc/login.defs file. In general, system users are users with UID less than 1000 and non­system users are users with UID between 1000 and 6000. Following is an example
/etc/login.defs file.

# Min/max values for automatic uid selection in useradd
UID_MIN 1000
UID_MAX 60000
# System accounts
#SYS_UID_MIN 100
#SYS_UID_MAX 999

The output of the a) and b) should include {Total number of users, User Names}.

3. c) Report on non­system user disk usage

The output should contain the following information:
{username, total_no_of_directories, total_number_of_files, total_size }

For this option, the script is expected to traverse through each user home directory specified in password file and report statistics of disk usage of each non­system user.

4. d) [Help Functions] Generate 5 core files randomly in at least 3 normal users directories.
e) Detect and report core files in non­system user directories

f) Remove core files in non­system user directories core files (program memory dumps) are created when a program terminates involuntarily in Unix like systems.

The file name is always 'core'. It is preferred to clean out all of the core files in the system as they are waste of  storage.

For option d), the script needs to generate 5 empty files with file name core randomly in at least 3 non­system users' directories. For this option check the shell command touch. This is a help function for testing option e and f.

In order to get full 1.5 marks, the path of core file generation needs to be randomized.

For option e), the script traverses through non­system users' directories, locates core files and their absolute path.

It needs to generate a report to the console. The report format can be {non­system user name, core file with full absolute path, core file size, core file timestamp}.

For option f), the script removes the core file and write the action into a log.txt file in append mode. The script expects to generate deletion information of the log files and then write deletion information into a log.txt file. The format can be {timestamp of deletion, non­system user name, core file name with full absolute path, core file size, core file timestamp}

5. x) Exit.

The script is expected to quit after user click x.

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M9132065

Have any Question?


Related Questions in Programming Language

Task working with arraysoverviewin this task you will

Task: Working with Arrays Overview In this task you will create a simple program which will create and work with an array of strings. This array will then be populated with values, printed out to the console, and then, w ...

Assignment - proposal literature review research method1

Assignment - Proposal, Literature Review, Research Method 1. Abstract - Summary of the knowledge gap: problems of the existing research - Aim of the research, summary of what this project is to achieve - Summary of the a ...

Assignment - haskell program for regular expression

Assignment - Haskell Program for Regular Expression Matching Your assignment is to modify the slowgrep.hs Haskell program presented in class and the online notes, according to the instructions below. You may carry out th ...

Question 1 what is hadoop explaining hadoop 2 what is

Question: 1. What is Hadoop (Explaining Hadoop) ? 2. What is HDFS? 3. What is YARN (Yet Another Resource Negotiator)? The response must be typed, single spaced, must be in times new roman font (size 12) and must follow t ...

Task - hand execution of arraysoverviewin this task you

Task - Hand Execution of Arrays Overview In this task you will demonstrate how arrays work by hand executing a number of small code snippets. Instructions Watch the Hand Execution with Arrays video, this shows how to ste ...

Task silly name testeroverviewcontrol flow allows us to

Task: Silly Name Tester Overview Control flow allows us to alter the order in which our programs execute. Building on our knowledge of variables, we can now use control flow to create programs that perform more than just ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Extend the adworks applicationi add dialogs to allow the

Extend the AdWorks application I. Add Dialogs to allow the user to Add, Edit, Read and Delete a Customer and refresh the view accordingly. 1. The user should be able to select a specific customer from the DataGrid and cl ...

Php amp session managment assignment -this assignment looks

PHP & SESSION MANAGMENT ASSIGNMENT - This assignment looks at using PHP for creating cookies and session management. Class Exercise - Web Project: Member Registration/Login This exercise will cover adding data connectivi ...

Assignment task -q1 a the fibonacci numbers are the numbers

Assignment Task - Q1. (a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of the ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As