[go: up one dir, main page]

0% found this document useful (0 votes)
294 views8 pages

Operating System (22516) : "Implementing Directory Management Using Shell Script"

This micro-project report details the implementation of a directory management system using shell scripting. The project aims to perform functions like listing directories, creating directories, and modifying directories. A shell script was created with a menu-driven interface to allow users to navigate directories, rename, copy, move and delete directories. The output screenshots show examples of creating, renaming and listing directories through the shell script. Skills developed include learning shell scripting commands and directory management techniques.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
294 views8 pages

Operating System (22516) : "Implementing Directory Management Using Shell Script"

This micro-project report details the implementation of a directory management system using shell scripting. The project aims to perform functions like listing directories, creating directories, and modifying directories. A shell script was created with a menu-driven interface to allow users to navigate directories, rename, copy, move and delete directories. The output screenshots show examples of creating, renaming and listing directories through the shell script. Skills developed include learning shell scripting commands and directory management techniques.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

MICRO-PROJECT REPORT

“Implementing Directory Management using Shell Script”


Under the subject
Operating System [22516]
Submitted by

Sr. No. Roll No. Name


1 2264 Sathe Pallavi Bhagavan
2 2267 Kale Prachi Subhash
3 2277 Yadav Vaishnavi Patangrao

Under guidance of
Mrs.S.B.Patil
Department of Computer Engineering
Government Polytechnic, Karad

1
MICRO-PROJECT REPORT
“Implementing Directory Management using Shell Script”

1.0 Rationale:-
In our project we implement the Directory management system by using shell
programming. Shell is a software program that interprets commands from the users so that
the operating system can understand them and perform the appropriate functions.
Directory management constitutes the functions dealing with organization and
maintenance of various directories. Directories usually contain files of any type, but this
may vary between file systems. The content of a directory does not affect the directory
object itself.
In this directory management system project we perform function like Listing
Directories, Creating Directories, Modifying Directories

2.0 Aims/Benefits of Micro-project:-


A directory is a location for storing files on your computer. Directories are found in
a hierarchical file system, such as Linux, MS-DOS, OS/2, and Unix. A shell script is
small computer program that is designed to be run or execute by the Unix shell, which is
command-line interpreter. A shell script is basically a set of commands.

3.0 Course Outcome achieved :-


1] The procedure of allocating CPU to the given process using the specified OS.
2] Apply file management techniques.

2
4.0 Actual Procedure Followed:-
echo "    "
echo "----Implementing Directory Management----"
echo "    "
ch=0
while [ $ch -lt 6 ]
do
echo "Press the following to :"
echo "1) Create a new directory."
echo "2) Modify a directory."
echo "3) Navigate into directory."
echo "4) Listing directories."
echo "5) Exit."
read ch

case $ch in
1) echo " "
echo "---Creation of Directory---"
echo "  "
echo "Enter the name of the directory:"
read name
mkdir $name
;;
2) echo " "
echo "---Modification of Directory---"
echo "    "
echo "Enter the directory to be modified:"
read orgdir
echo "Press the following to :"
echo "    "
echo "1) Rename directory."
echo "2) Copy directory to another."
echo "3) Move directory."
echo "4) Delete directory."
echo "5) Exit from Modify Mode."
read modch

case $modch in
1) echo "  "
echo "---Rename a directory---"
echo "  "
echo "Enter new name for the directory:"
read newname
mv $orgdir $newname

;;
2) echo "  "

3
echo "---Copying a directory to another---"
echo "  "
echo "Enter target directory:"
read target
mkdir $target
cp $orgdir $target
;;
3) echo "  "
echo "---Moving a directory---"
echo "  "
echo "Enter target directory:"
read target
mkdir $target
mv $orgdir $target
;;
4) echo "  "
echo "---Deleting a directory---"
echo "  "
rmdir $orgdir
;;
5) echo "  "
echo "---Exiting from modify mode---"
echo "  "
exit
;;
esac
;;
3)
echo "---Navigation of Directory---"
echo "  "
echo "Enter your choice for method of navigation :"
echo "1) Go to Parent Directory. "
echo "2) Navigate to specific directory."
echo "3) Exit from Navigate Mode."
read navch

case $navch in
1) echo "  "
echo "---Parent Directory---"
echo "  "
cd ..
pwd
;;
2) echo "  "
echo "---Navigation to Specific Directory---"

echo "  "


echo "Enter the target Path:"
read path

4
cd $path

pwd
;;
3) echo "  "
echo "---Exiting from Navigate Mode---"
echo "  "
exit
;;
esac
;;
4)
echo "---    Listing of Directories---"
echo "  "
echo "Enter your choice for method of listing :"
echo "1) List of directories. "
echo "2) List of directories and their details."
echo "3) Exit from List Mode."
read lisch

case $lisch in
1) echo "  "
echo "---List of directories---"
echo "  "
ls
;;
2) echo "  "
echo "---Detailed List of directories---"
echo "  "
ls -l
;;
3) echo "  "
echo "---Exiting from List Mode---"
echo "  "
exit
;;
esac
;;
5)echo "  "
echo "---Exiting---"
echo "  "
exit
;;
esac
done

5
5.0 Output :-

Fig.1 Create Directory

Fig.2 Rename Directory

6
Fig.3 Navigate directory

Fig.4 Listing directory

7
Fig.5 Exit directory

6.0 Actual Resources Required:-


Sr. Name of Specification Qty Remarks
No Resource
/material
1] Laptop/PC Intel (R) Core( TM ) 1
Due24 RAM
2] Internet - -
3] Printer Brother DCP-100 1
printer

7.0 Skill Developed /learning out of this Micro-Project :-


1] We studied the various commands.
2] We collect information of directory management.
3] We understood how to run commands in shell scripting in CENTOS.

8.0 Application of this Micro-project :-


1] To learn the how to add, modify, delete directories in shell script.
2] To understood different commands used in project.

You might also like