Operating Systems Assignment: File and Directory Manipulation, Assignments of Software Engineering

An operating systems assignment focusing on file and directory manipulation. The student, Manish Rao, describes changing directories, creating files and directories, using commands like 'clear', 'echo', and 'stat', and checking file types using a bash script.

Typology: Assignments

2020/2021

Uploaded on 03/22/2021

Elle_Evens
Elle_Evens 🇮🇳

1 document

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Operating Systems Assignment
Name:B.Manish Rao
I.D: 19BIT0333 L-1
Here we have changed the directories and we can see as of now I have only created dir5,dir6,dir7,dir8
So there is no dir3 so it shows directory3 is not created.
pf3
pf4
pf5

Partial preview of the text

Download Operating Systems Assignment: File and Directory Manipulation and more Assignments Software Engineering in PDF only on Docsity!

Operating Systems Assignment

Name:B.Manish Rao

I.D: 19BIT0333 L- 1

Here we have changed the directories and we can see as of now I have only created dir5,dir6,dir7,dir So there is no dir3 so it shows directory3 is not created.

L- 2

Here we have created the files as when we type ‘dir’ it displays every files and directories created in it. When we use ‘ clear command ’ the terminal will clear all the data. This is the “echo command” using echo command we display or store the data in files or we directly used to print the data.

(i)

(ii)

(iii) #!/bin/bash FILES=$@ for FILE in $FILES do if [ - f “$FILE” ] then echo “$FILE is a reguler file” elif [ - d “$FILE” ] then echo “$FILE is a directory” else echo “$FILE is another type of file” fi ls - l $FILE done (iv) (v)