UNIVERSITY OF WEST ATTICA
SCHOOL OF ENGINEERING
DEPARTMENT OF COMPUTER ENGINEERING AND INFORMATICS
Operating Systems I
Vasileios Evangelos Athanasiou
Student ID: 19390005
Supervision
Supervisor: Vasileios Mamalis, Professor
Co-supervisor: Georgios Pentaris, Postdoctoral Researcher
Athens, January 2022
This repository contains a comprehensive assignment for Linux shell scripting, designed to enhance students’ proficiency in managing the Linux file system and processes through Bash scripts.
| Section | Folder/File | Description |
|---|---|---|
| 1 | assign/ |
Assignment material for the Bash Scripts workshop |
| 1.1 | assign/OS1_Lab_Ask-2-2021-22.pdf |
Assignment description in English |
| 1.2 | assign/ΛΣ1_Εργ_Ασκ-2-2021-22.pdf |
Assignment description in Greek |
| 2 | docs/ |
Bash script scenarios and explanations |
| 2.1 | docs/Bck-Script.txt |
Backup script scenario in English |
| 2.2 | docs/Bck-Σενάριο.txt |
Backup script scenario in Greek |
| 2.3 | docs/Cmpdir-Script.txt |
Compare directories script scenario in English |
| 2.4 | docs/Cmpdir-Σενάριο.txt |
Compare directories script scenario in Greek |
| 2.5 | docs/Createpvs-Script.txt |
Create PVS script scenario in English |
| 2.6 | docs/Createpvs-Σενάριο.txt |
Create PVS script scenario in Greek |
| 2.7 | docs/Mfproc-Script.txt |
Mfproc script scenario in English |
| 2.8 | docs/Mfproc-Σενάριο.txt |
Mfproc script scenario in Greek |
| 2.9 | docs/Searching-Script.txt |
Searching script scenario in English |
| 2.10 | docs/Searching-Σενάριο.txt |
Searching script scenario in Greek |
| 3 | src/ |
Bash script source files |
| 3.1 | src/bck.sh |
Backup script |
| 3.2 | src/bck1.sh |
Backup variant 1 script |
| 3.3 | src/bck2.sh |
Backup variant 2 script |
| 3.4 | src/cmpdir.sh |
Compare directories script |
| 3.5 | src/createpvs.sh |
Create PVS script |
| 3.6 | src/mfproc.sh |
Mfproc processing script |
| 3.7 | src/searching.sh |
Searching script |
| 4 | README.md |
Repository overview and usage instructions |
The assignment covers five Bash scripts that handle:
- Searching Files – Using
find,ls, andgrepto filter by permissions, modification time, and directory access. - Directory Comparison (cmpdir) – Identifying unique and common files, moving them, and creating hard links.
- Directory Creation (createpvs) – Creating directories with proper permissions and ownership.
- Backup (bck) – Archiving files/directories using
tarwith optional scheduling viacronorat. - Process Management (mfproc) – Displaying processes by user or state (Running, Sleeping, Zombie).
The goal is to strengthen Linux CLI skills and shell scripting expertise.
- Operating System: Linux (or WSL for Windows)
- Shell Environment: Bash or compatible
- Commands Used:
find,ls,grep,chmod,chown,tar,cron,at,ps, etc.
git clone https://github.com/Operating-Systems-I/Bash-Scripts.git
cd Bash-Scriptschmod u+x searching.sh createpvs.sh cmpdir.sh bck.sh bck1.sh bck2.sh mfproc.sh./searching.sh $1 $2
./createpvs.sh $1 $2 $3 $4
./cmpdir.sh $1 $2 $3
./bck.sh $1 $2 $3
./bck1.sh $1 $2 $3 $4
./bck2.sh
./mfproc.sh