Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Operating System Expert

Overall requirements:

For this assignment, your task is to prepare a shell script named sysManage, which goes through the home directories in a Unix/Linux System and conducts the following menu operations:

a) List system users

b) List non­system users

c) Report on non­system user disk usage

d) [Testing Function] 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

x) Exit

Detail explanation

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 ex

/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 /etc/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.

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 prepare the action into a log.txt file in append mode. The script expects to generate deletion information of the log files and then prepare 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.

Operating System, Computer Science

  • Category:- Operating System
  • Reference No.:- M91679

Have any Question?


Related Questions in Operating System

Foundation of information technologyresearch types of

Foundation of Information Technology Research types of operating systems that are currently available and provide a scenario in which the operating system you chose would be appropriate to be used in this situation. Expl ...

Question students working at individual pcs in a computer

Question : Students working at individual PC's in a computer laboratory send their files to be printed by a server that spools the files on its hard disk. Under what conditions may a deadlock occur if the disk space for ...

Question topic computerized operating systems os are almost

Question: Topic: Computerized Operating Systems (OS) are almost everywhere. We encounter them when we use out laptop or desktop computer. We use them when we use our phone or tablet. Find articles that describes the diff ...

Assignment -building a multi-threaded web server using c

Assignment - Building a multi-threaded web server using C and p threads, following the model from the lecture. Your program will have one thread acting as a dispatcher thread, listening fornetwork connections with reques ...

Question description of lasa in this assignment you will

Question: Description of LASA: In this assignment, you will select a real-world operating system (can be for a PC, server, tablet, handheld, or embedded device). You will introduce the operating system and its components ...

Question you are a security administrator responsible for

Question: You are a security administrator responsible for providing secure configuration requirements for new laptop deployments. After reading Module 2 of Certified Secure Computer User v2exercises, apply the configura ...

State the required answer precisely and then provide proper

State the required answer precisely and then provide proper explanation. It is not enough to provide one- word or one-line answers. Consider a computer embedded in the control of a manned spacecraft. Would it require an ...

Show all stepssuppose that the following processes arrive

Show all steps Suppose that the following processes arrive for execution at the times indicated. Each process will run the listed amount of time. in answering the questions, use non-preemptive scheduling and base all dec ...

Question what do you see as the major differences between

Question : What do you see as the major differences between UNIX/Linux and other operating systems, such as Windows and Mac OS X? The response must be typed, single spaced, must be in times new roman font (size 12) and m ...

Question note apa format 250 words and three reference

Question: Note: APA format 250 words and three reference without plagarism Computerized Operating Systems (OS) are almost everywhere. We encounter them when we use out laptop or desktop computer. We use them when we use ...

  • 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