1 menu optionsthe shell script should generate a menu to

Assignment Help Application Programming
Reference no: EM13347701

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.

Reference no: EM13347701

Questions Cloud

Part 1sovereign mines is a large mining firm considering : part 1sovereign mines is a large mining firm considering the purchase of a new drilling machine. the machine will be
Question 1 value drivers and horizon value of constant : question 1 value drivers and horizon value of constant growth firmyou are given the following forecasted information
Nbspnbspnbspnbspnbspnbspnbspnbspnbspnbspnbspnbsp nbsp : nbspnbspnbspnbspnbspnbspnbspnbspnbspnbspnbspnbsp nbsp nbspnbspnbspnbspnbspnbspnbspnbspnbspnbspnbsp comprehensive
Aim to introduce the concepts of computer graphicsto : aim to introduce the concepts of computer graphics.to develop a program using opengl.to gain experience in writing
1 menu optionsthe shell script should generate a menu to : 1. menu optionsthe shell script should generate a menu to allow the user to choose each option. after executing options
Casemoto knappy is a manufacturer of automobile motorsnbsp : casemoto knappy is a manufacturer of automobile motors.nbsp the manufacturing process takes a couple of months.nbsp the
Question 1 detail for each of the four following mips : question 1. detail for each of the four following mips instructions which actions are being taken at each of their
Write a java program in a netbeans project that reads a : write a java program in a netbeans project that reads a text file containing the names and addresses of several people
1 state the thesis of your essay if you do not know what a : 1. state the thesis of your essay. if you do not know what a thesis is in relation to writing an essay or if you do not

Reviews

Write a Review

Application Programming Questions & Answers

  Rtl sa is a company which develops bespoke solutions for

rtl sa is a company which develops bespoke solutions for the rubber industry. they produce both rubber compound which

  Write a paper on mcdonaldsethics and social responsibility

write a paper on mcdonalds.ethics and social responsibility at mcdonaldspaper includesabout mcdonaldscorporate social

  Implement functions using x86 assembly in addition to

implement functions using x86 assembly. in addition to implementing procedures this assignment requires to pass

  The increasing need to travel and lifestyle changes of

the increasing need to travel and lifestyle changes of society has made airlines industry one of the most demanded and

  Write a program that creates a hierarchy of processes using

write a program that creates a hierarchy of processes using the fork system call. the initial program termed the root

  Question 1part 1 conditional logicconditional logic is used

question 1part 1 conditional logicconditional logic is used within your application to make decisions during the

  Design a program that models the worms behavior in the

design a program that models the worms behavior in the subsequent scenarioa worm is moving toward an apple. each time

  Hypertext markup languagethe basics of hypertext markup

hypertext markup languagethe basics of hypertext markup language and world wide web. first you will learn about

  In a typical cpu implementation the design-cycle starts

in a typical cpu implementation the design-cycle starts with a cc based instruction set simulator iss of the target

  Discussion htmlcssjavascript placementnbspplease respond to

discussion htmlcssjavascript placementnbspplease respond to the followingcompare and contrast the process of adding

  Problem descriptionyou are working as an engineer for a

problem descriptionyou are working as an engineer for a materials manufacturing research lab and have been asked to

  If the user wants to read the input from a file then the

if the user wants to read the input from a file then the output will also go into a different file. if the user wants

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd