Answered step by step
Verified Expert Solution
Question
1 Approved Answer
General instructions 1 . The approach of solving the Problem solely depends on the Candidate 2 . Make sure to have Draw.io diagrams for the
General instructions
The approach of solving the Problem solely depends on the Candidate
Make sure to have Draw.io diagrams for the workflowns and application architecture
Every configuration, code written should be pushed on git Private Repo
Your are not permitted to share the doc with anyone, even with your colleagues
Scenario There is a customer who came to you with a problem to have a custom linux
command for his operations. Your task is to understand the problem and create a linux
command via bash script as per the instructions.
Command name internsctl
Command version v
Section A
I want a manual page of command so that I can see the full documentation of the command.
For example if you execute the command
man ls
as output we get the doc and usage guidelines. Similarly if I execute man internsctl I want
to see the manual of my command.
Each linux command has an option help which helps the end user to understand the use
cases via examples. Similarly if I execute internsctl help it should provide me the
necessary help
I want to see version of my command by executing
internsctl version
Section B
I want to execute the following command for
Part Level Easy
I want to get cpu information of my server through the following command:
$ internsctl cpu getinfo
Expected Output
I want similar output as we get from lscpu command
I want to get memory information of my server through the following command:
$ internsctl memory getinfo
Expected Output
I want similar output as we get from free command
Part Level Intermediate
I want to create a new user on my server through the following command:
$ internsctl user create
Note above command should create user who can login to linux system and access his home
directory
I want to list all the regular users present on my server through the following command:
$ internsctl user list
If want to list all the users with sudo permissions on my server through the following command:
$ internsctl user list sudoonly
Part Advanced Level
By executing below command I want to get some information about a file
$ internsctl file getinfo
Expected Output make sure to have the output in following format only
xenonstack@xsd:~$ internsctl file getinfo hello.txt
File: hellot.txt
Access: rwrr
SizeB:
Owner: xenonstack
Modify: ::
In case I want only specific information then I must have a provision to use options
$ internsctl file getinfo options
size, s to print size
permissions, p print file permissions
owner, o print file owner
lastmodified, m
Expected Output with options
If I want to obtain the size of the specified file only, I should be able to use the following
command:
xenonstack@xsd:~$ internsctl file getinfo size hello.txt
If I want to obtain the permissions of the specified file only, I should be able to use the following
command:
xenonstack@xsd:~$ internsctl file getinfo permissions hello.txt
rwrr
If I want to obtain the owner of the specified file only, I should be able to use the following
command:
xenonstack@xsd:~$ internsctl file getinfo owner hello.txt
xenonstack
If I want to obtain the last modified time of the specified file only, I should be able to use the
following command:
xenonstack@xsd:~$ internsctl file getinfo lastmodified hello.txt
::
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started