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

Operating systems assignmentwe have just 3 processes p1 p2

Operating Systems Assignment We have just 3 processes, P1, P2 and P3, and they arrive at 1, 15 and 23 milliseconds respectively, and they each have two CPU Burst as follows (there are no I/O Bursts). P1: 10 3 P2: 5 12 P3 ...

Assignmentthe power supply provides the power for all of

Assignment The power supply provides the power for all of the components of a personal computer. When replacing a power supply, it is important to consider the power needs of the internal components of the system, as wel ...

Operating systems assignmentprocessor schedulingprocessor

Operating Systems Assignment Processor Scheduling Processor scheduling is aimed to assign processes to be executed by the processor (or processors) in order to achieve certain operating system objectives, such as respons ...

Problemnbspdescriptionflash back to flash forward see

Problem  Description: Flash Back to Flash Forward (see Chapter 1 Practice Exercise 1.2 and the OS in DevOps Discussion Area) While having a discussion with your OS DevOps team, you are approached with the situation: our ...

V1 file processing commands worksheetmiddot

Version 1 File Processing Commands Worksheet · What UID and PID have the highest amount of physical memory a process has used and is not swapped out? Show all processes and full output. · If using a long listing and no p ...

Your objective is to create a program that simulates round

Your objective is to create a program that simulates Round Robin CPU scheduling. You may write your program in C, C++, Java, or Python. If you choose C, C++, or Java you must include a Makefile. Your program will be test ...

Lab 1 develop system administration procedures for windows

Lab #1: Develop System Administration Procedures for Windows 8.1 Security Configuration Purpose: Develop systems administration procedures to implement systems security configuration guidance and best practices. Objectiv ...

Assignment1 arrigo postulated three key propositions of

Assignment (1) Arrigo postulated three key propositions of postmodernism. Explain them in full, using at least 250 words. (2) Daly and Chesney-Lind considered five insights to be distinctive features of feminist theory? ...

Questionpick an aspect of an historical operating system ie

Question: Pick an aspect of an historical operating system (IE. Multics) and detail how a modern system supports that function. 10 to 20 lines are enough and please provide citations or references.

Assignment directory treein this assignment students are

Assignment: Directory Tree In this assignment, students are required to implement an operating system command that displays the tree structure of a folder or directory. The program asks the user to enter a folder name. N ...

  • 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

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro

Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen