Comprehensive Analysis of CLI Role in Modern Operating Systems

Verified

Added on  2020/05/28

|19
|4179
|182
Report
AI Summary
This report provides a comprehensive analysis of the Command Line Interface (CLI) and its role in modern computing, focusing on its application within operating systems. The study delves into various aspects of CLI usage, including file and directory handling, detailing commands for creating, deleting, moving, and copying files and directories. It also explores process and task management commands, specifically examining process management commands like 'top', 'htop', 'ps', 'pstree', and 'kill', and task management commands related to PID, session names, memory usage, status, user names, CPU time, and window titles. Furthermore, the report investigates file system and disk management commands, with a particular focus on disk management utilities and usage commands. Finally, it examines the role of CLIs in scripting, discussing their significance and functionality. The report utilizes examples and screenshots to illustrate the concepts, providing a practical understanding of CLI operations within different operating systems.
Document Page
Running head: Role of CLI
Role of the CLI in modern computing operating systems
Name of the student:
Name of the university:
Author Note
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
1Role of CLI
Executive summary
Command Line Interfaces refers to a text-based interface that is utilized in software and operating
system. It helps users to respond to visual prompts and is performed by typing command. This is to
interface and replies at the same time. The following report is intended to consider the role of CLI in
a current operating system. Examples and screenshots are used to discuss the case further. In this
study method of directory and file management commands of a process and task management are
also examined. Next, it demonstrates file or disk management and usage commands. At last, the
report analyzes scripting and CLI.
Document Page
2Role of CLI
Table of Contents
1. Introduction:......................................................................................................................................3
2. File and Directory Handling:.............................................................................................................3
2.1. Creating New Files and Directories:...........................................................................................3
2.2. Deleting Files and Directories....................................................................................................4
2.3. Moving Files and Directories:....................................................................................................4
2.4. Copying Files and Directories:...................................................................................................5
3. Process and Task Management commands:......................................................................................5
3.1. Process management commands:...............................................................................................5
3.2. Task management commands:....................................................................................................8
4. File system or disk management and usage commands:...................................................................9
4.1. Disk management commands:....................................................................................................9
4.2. Usage commands:.....................................................................................................................10
5. CLIs and Scripting:..........................................................................................................................13
5.1. Discussion on CLIs:..................................................................................................................13
5.2. Discussion on Scripting:...........................................................................................................14
6. Conclusion:......................................................................................................................................15
7. References:......................................................................................................................................17
Document Page
3Role of CLI
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
4Role of CLI
1. Introduction:
Modern computing has witnessed the development of users to react to visual prompts
regarding operating systems and control software. Command lines are regarded as the most often
utilized in engineering and scientific environments to programming.
CLI or “Command Line Interface” is the text-based interface used for operating systems and
software. This is used to allow users to react to visual prompts. This is done by typing command to
interface and get a reply similarly.
The report includes methodologies of file and directory handling along with the process and
task management commands. Then file system or disk management along with usage commands are
demonstrated here. Lastly, CLIs and scripting are analyzed in this study.
2. File and Directory Handling:
2.1. Creating New Files and Directories:
Creating New Directory:
In order to create a directory within any current directory mkdir or make directory command
used to be followed by the name of particular directory to be created.
Creating New File:
In order to develop new file of any kind, “touch” command can be used after by that
filename. Type of data must be specified while creating filename extension. For example, the
command to create empty HTML document named as an index is touch index.html (Beraldi 2017).
Document Page
5Role of CLI
2.2. Deleting Files and Directories
Deleting a File:
Files can be removed using rm command. Deleting directories needs additional instructions.
A file can be deleted typing rm along with the name of a file to be deleted. To eliminate
“contact.html” file the command to be used is rm contact.html.
Deleting a Directory:
The safety measures can be overridden by specifying command options. They are denoted as
switches or flags. For instance, the default behaviour of rm command never permits to delete a
directory and reveal what has been tried to remove any list (Read et al. 2016). However, -r option
can be used to modify default behaviour of rm command where r is the abbreviation of recursive.
Besides, the js directory and every file within the list can be removed by rm -r js.
Figure 1: “Usage of rm command”
(Source: Created by Author)
2.3. Moving Files and Directories:
In order to transfer file or directory to new location, the mv command can be used. As a list
is run, all their data and subdirectories go along with that. The mc command comes with a couple of
Document Page
6Role of CLI
arguments. Here, first case is the name of directory or file needed to be moved. Then, second one is
the position where this is to be moved.
While main.css is to be moved to style directory, the command to be issued is mv main.css
styles.
2.4. Copying Files and Directories:
Copying a File:
The command to be used for creating copy of file referred to as index.htm within present
working directory is cp index.html contact.html. Here a copy of the file is named contact.html.
Copying a Directory:
While the directory is copied to another position, every files and subdirectory get copied with
that. The command to copy styles directory is cp -r styles stylesNew. Here a copy of style directory
is named stylesNew.
3. Process and Task Management commands:
3.1. Process management commands:
To describe the process management commands, the LINUX operating system is considered
here.
Top command:
This supplies information of the process existing at present. The first part of the information
is an overview of the situation. The second part is organized in columns providing details of every
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
7Role of CLI
person including their distinct reference number, priority, status and resource usage (Greenberg and
Witten 2014).
Htop:
It is same as top. Here, information is presented in more transparent format. One can select a
specific process and then act on that with htop display.
Ps command:
This is to list running processes. One or other option must be specified to retrieve helpful
data. It contains all processes over the system.
Command “ps –a” has been listing every processes on the system. “ps -a | grep
mysqldwould” command, picking out mysqld process. For example, it takes place as one has a
connection through a system to MySQL database.
Pstree:
It is used to show tree diagram of processes displaying relationship existing between them
(Pot'Vin, Miller and Smith 2014). Here, all process is created, spawned through additional or parent
process in LINUX. It is to be noted that as something is altered for parent process, the child process
also gets affected.
Document Page
8Role of CLI
Figure 2: “Use of Pstree command”
(Source: Created by Author)
Who:
It shows a list of every user logged currently to LINUX system. As this occurs and operating
system, one has a free hand in managing process as liked.
Kill:
This is to halt process along with high prejudice. Though in general sense, the function has
been meant to send various kinds of signals. This has been allowing stopping groups or operations
instead of having to completely halt or reboot the LINUX system. This is something that must also
be appreciated by other users.
Document Page
9Role of CLI
3.2. Task management commands:
PID:
This is the process ID where systems assign numbers to every process such that it keeps
tracks of that. This has been possible to possess various methods running with same names
(Gorgolewski et al. 2017). However, PID is unique. This ID has not been equal every time a specific
program is opened.
Session Name:
Till someone is at a network, this reads “Console”. It denotes that the process has been
starting locally.
Session#:
Every session is assigned a number.
Mem Usage:
It provides useful information regarding an amount of memory in kilobytes could be
processed has been used during running of Tasklist.
Status:
Providing current status of a process as “unknown”, “not responding”, “running” is the task
of this command. It is helpful to seek hung processes. The unknown status refers to a normal
process. However, “Not Responding” denotes a process that could be stopped.
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
10Role of CLI
User Name:
The user account below which process runs, Window runs various methods and systems.
These accounts account NETWORK SERVICE, LOCAL SERVICE and SYSTEM that has been
appearing. This has been coupled with local domain denoted by NT AUTHORITY.
CPU Time:
This indicates the total amount of cycle time of CPU that is utilized by process from the very
first. It could be a more significant number as the computer is never turned off.
Window Title:
Windows has been displaying name of a process as it has been existing. This at many times
helps in identifying what this program has been including (Giorgino 2014).
4. File system or disk management and usage commands:
4.1. Disk management commands:
A quick way of opening disk management utility within any Windows version has been from
Command Prompt. For this, a single short command is to be typed and disk management utility
begins at any instant. The disk management is placed various layers deeper in maximum Windows
version. Hence this has a quicker way to get access to this super-tool for hard-drives. Thus other
storage devices have been coming very handy. Disk management command is similar in every
Windows version. Hence instructions apply same for all versions of Windows (Huang and Cronk
2015). The steps to begin disk management from a command prompt in Windows are discussed
hereafter.
Document Page
11Role of CLI
Opening disk management from a “command prompt”:
In order to open disk management from different command prompt just a few seconds are
taken. For Windows 10 or 8, the “Run” option is to be opened from the start menu or Application
screen. For Windows 7 and Vista the “Start” button is to be clicked.
The command to be typed in Disk management is diskmgmt.msc. It is to be noted that
opening disk management from the command prompt is needed as the command prompt program is
opened. Besides, running an executable program such as diskmgmt.msc from search or run box has
been accomplishing that same thing (Belmann et al. 2016). Further, diskmgmt.msc has never been a
disk management command more than non-command-line tools that are executable is a command.
The expression is only a run command for Disk Management program. Then, disk management
opens quickly. Thus one can use disk management to alter drive letters, partitioning drives,
formatting drive and so on.
However, for Windows 8 and 10, there is also a quicker method. Opening Disk management
through “Power User Menu” is faster than its run command. In Windows 10, one can execute
diskmgmt.msc from Cortana interface directly (Gureckis et al. 2016). This is efficient as anyone is
used to use for performing commands already.
4.2. Usage commands:
Usage guide is developed initially through defining an arbitrary number of various sections.
For example in description part, footer, examples, options list, synopsis, and so on. Every element
contains an optional header and few contents. Every section should be a kind of material or
optionList. The section data get passed to command line usage() rendering usage guide (Berman et
al. 2014). Here inline ANSI formatting could be used elsewhere under section content using various
formatting syntax.
chevron_up_icon
1 out of 19
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]