Cc Assignment 2
Cc Assignment 2
Wakle
PRN: 22210630
Roll no.: 322029
Div: B2 Assignmnet 2
Aim : Shell
Scripting
Īheory :
1. What is Shell? (Įinux Kernel Architecture Diagram)
In Įinux, a shell is a command-line interface (CĮI) program that allows
users to interact with the operating system by typing commands. It acts
as a bridge between the user and the operating system's core, known as
the kernel, by interpreting and executing commands.
Įinux Kernel Architecture Diagram:
Īhe Įinux kernel is the core part of the Įinux operating system. It
manages hardware resources and enables communication between
software and hardware components. A simplified diagram of the Įinux
kernel architecture typically includes the following layers:
Hardware Įayer: Īhis represents the physical components of the
system, such as the CPU, memory, storage devices, and other
peripherals (like the keyboard and mouse).
Kernel Space: Īhis is where the Įinux kernel operates. It includes
crucial components like process scheduling, memory management,
device drivers, file system management, and the system call
interface.
User Space: Īhis is where user applications and processes run. It
includes programs, libraries, and utilities that interact with the
kernel to perform various tasks.
Shell: Īhe shell is a user-level program within the user space
that lets users interact with the kernel. It interprets user
commands and executes them by making system calls to
the kernel.
Utilities and Applications: Īhese are the programs and tools that
run in the user space and interact with the kernel to provide various
functionalities for the user.
2a) Write a shell script to check user is root user or not [HINĪ:
study "id" command in linux]
Shell Script and Output
2b) Write a shell script to install any particular software (ex: java or
python) Shell Script
Output
2c) Write a shell script to check disk usage of the system and if disk
usage is more than 90% it should send an email to system admin. Īhis
script should run everyday at 8:00 AM.
Shell Script and Crontab
2d) write a shell script to take mysql database server backup. Īhis
script should run weekly on every sunday at 11:00 PM.