Ask Question, Ask an Expert

+1-415-315-9853

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

Question 1an important service provided by any system is

Question 1: An important service provided by any system is the ability to run a process on a predetermined schedule without human intervention. The "automation" of tasks can reduce the workload of the system administrato ...

Lab-file processingobjectivesbulladd persistent data

Lab-File Processing OBJECTIVES • Add persistent data storage to your Week 4 Lab using text file input/output. PROBLEM: Stocks4U Portfolio Management System The portfolio management system you developed for Stocks4U needs ...

What is the purpose of an embedded operating system and why

What is the purpose of an embedded operating system and why would one be used? Discuss at least two advantages and two vulnerabilities in utilizing an embedded OS. Directions: Your completed assignment should be at least ...

Questioninformation technology planning how much should a

Question:INFORMATION TECHNOLOGY PLANNING How much should a company invest in IT? How does a company know if it under-invests or over-invests in IT? If you haven''t heard of the "IT-productivity paradox," then it is the t ...

Question information technology planningassignment

Question: INFORMATION TECHNOLOGY PLANNING Assignment Overview This module is about the problems of creating information technology plans that work within the scope of the organization''s strategic objectives. It is also ...

Discussionconduct a system evaluation on your computer

Discussion Conduct a system evaluation on your computer (Windows 8 and 10 are covered) to decide if your current computer meets your needs for now and in the future. (Windows 7, Mac OS) • What is your CPU utilization? • ...

Question 1an important service provided by any system is

Question 1: An important service provided by any system is the ability to run a process on a predetermined schedule without human intervention. The “automation” of tasks can reduce the workload of the system administrato ...

Assignment exploring the machinein this assignment you will

Assignment: Exploring the Machine In this assignment, you will explore a computer (i.e., a Windows PC or a Mac computer). Specifically, you will view the system's general information, create a folder on the desktop of th ...

Firewall linux-a simple firewall is a filter which blocks

Firewall (Linux)- A simple firewall is a filter which blocks the packets based on the pre-defined filter rules. There are two general strategies to set-up a filter. One strategy is restrictive firewall which blocks all p ...

Operating systems- homeworkpurposethe purpose of this

Operating Systems- Homework Purpose The purpose of this exercise is to understand how creating files affects the available disk space and the available i-nodes on a disk partition on Linux/UNIX. Assignment Create and lea ...

  • 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

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate