



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
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
1 / 6
This page cannot be seen from the preview
Don't miss anything!




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.
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.
(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)