0% found this document useful (0 votes)
24 views5 pages

19bcs2848 - SWL 10

Uploaded by

19bcs2856
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views5 pages

19bcs2848 - SWL 10

Uploaded by

19bcs2856
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Course Name: - SECURING WINDOWS AND LINUX LAB Course Code: CSB-472

Experiment – 3.3

Aim: Write a shell script that displays a list of all the files in the current directory to
which the user has read, write, and execute permissions.

Tools/Software Required: Virtual Machine, Linux, VI editor.

Description:
Linux is an open-source operating system (OS). An operating system is the software that
directly manages a system’s hardware and resources, like CPU, memory, and storage. The OS
sits between applications and hardware and makes the connections between all your software
and the physical resources that do the work. The command line is your direct access to a
computer. It's where you ask software to perform hardware actions that point-and-click graphical
user interfaces (GUIs) simply can't ask.
A bash script is a file containing a sequence of commands that are executed by the bash
program line by line. It allows you to perform a series of actions, such as navigating to a specific
directory, creating a folder, and launching a process using the command line.
Advantages of Bash scripting:
Bash scripting is a powerful and versatile tool for automating system administration tasks,
managing system resources, and performing other routine tasks in Unix/Linux systems. Some
advantages of shell scripting are:
Automation: Shell scripts allow you to automate repetitive tasks and processes, saving time and
reducing the risk of errors that can occur with manual execution.

Name: -Shubham Bharti UID: -19BCS2848


Course Name: - SECURING WINDOWS AND LINUX LAB Course Code: CSB-472
Portability: Shell scripts can be run on various platforms and operating systems, including Unix,
Linux, macOS, and even Windows through the use of emulators or virtual machines.
Flexibility: Shell scripts are highly customizable and can be easily modified to suit specific
requirements. They can also be combined with other programming languages or utilities to
create more powerful scripts.

Accessibility: Shell scripts are easy to write and don't require any special tools or software. They
can be edited using any text editor, and most operating systems have a built-in shell interpreter.
Integration: Shell scripts can be integrated with other tools and applications, such as databases,
web servers, and cloud services, allowing for more complex automation and system
management tasks.
Debugging: Shell scripts are easy to debug, and most shells have built-in debugging and
errorreporting tools that can help identify and fix issues quickly.

Usage Steps/ Implementation:


Step 1: Create File.
vim Script.sh

Name: -Shubham Bharti UID: -19BCS2848


Course Name: - SECURING WINDOWS AND LINUX LAB Course Code: CSB-472

Step 2: Change permission.

chmod +x Script.sh

Name: -Shubham Bharti UID: -19BCS2848


Course Name: - SECURING WINDOWS AND LINUX LAB Course Code: CSB-472

Step 3: write code to print file in a directory

Output:

Name: -Shubham Bharti UID: -19BCS2848


Course Name: - SECURING WINDOWS AND LINUX LAB Course Code: CSB-472

Name: -Shubham Bharti UID: -19BCS2848

You might also like