# CSE424 / OS Lab

## Syllabus

{% file src="<https://3691559194-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzDcX1sSP1gmIRyZJgjfU%2Fuploads%2Fgit-blob-9eab6d3bf2e0d253da41d72bdbcddb4703e844dd%2FY2S4-CSE424-BTECH-CSE-IT-SYLLABUS.pdf?alt=media>" %}

### Lab Notes

\[⤓] [CSE424-OS-Lab-1](https://docs.google.com/document/d/1LyyqxFJCER86Kg5NlqMinjs4uQpfCDX-LBymcrgv2LY/edit?usp=sharing)

\[⤓] [CSE424-OS-Lab-2](https://drive.google.com/file/d/1ivDEp7DHyh4aaI_3CmE-rubpYBfiLUQB/view?usp=drive_link)

\[⤓] [CSE424-OS-Lab-3](https://drive.google.com/file/d/1_DvpV9iUkCr5OBborhoOoCfWHj33sGxP/view?usp=drive_link)

\[⤓] [CSE424-OS-Lab-4](https://drive.google.com/file/d/1bEusXMIsp0CAV0xL_Zg0bLVG5ILIdKxB/view?usp=drive_link)

\[⤓] [CSE424-OS-Lab-5](https://drive.google.com/file/d/18QuDiNIO-1sTke1bSYzpkqaysfVf0w3J/view?usp=drive_link)

## Experiments

<details>

<summary>EXPT1: File Permission</summary>

Write a shell Script to assign a file permission to the given file using Symbolic Mode/Absolute Mode:

```sh
// Some code
```

</details>

<details>

<summary>EXPT2: File Compression</summary>

To compresses a file using gzip and pack commands

```sh
// Some code
```

</details>

<details>

<summary>EXPT3: Pattern Search using grep &#x26; fgrep</summary>

To find a given pattern in a list of files of current directory using grep and fgrep commands.:

```sh
// Some code
```

</details>

<details>

<summary>EXPT4: Directory Creation and File Movement</summary>

Write a shell script to create two directories and store five files in one directory using the related commands and to transfer all the files to another directory

```sh
// Some code
```

</details>

<details>

<summary>EXPT5: File Existence Check &#x26; Information Display</summary>

Write a shell script to accept a file name as input and display whether it exits or not. If it exists, then give the details of its attributes like access permission, its size etc.:

```sh
// Some code
```

</details>

<details>

<summary>EXPT6: Sum of Number using Command Line</summary>

Shell Script to find out the sum of the given numbers using command line argument.

```sh
// Some code
```

</details>

<details>

<summary>EXPT7: Shell Script to Find Large/Small Number</summary>

Write a shell script to find the largest among the 3 given numbers also write a shell script to find the smallest.

```sh
// Some code
```

</details>

<details>

<summary>EXPT8: Shell Script to Find Sum of Digits of Number</summary>

Write a shell script to find sum of digits of a number

```sh
// Some code
```

</details>

<details>

<summary>EXPT9: Shell Script to Replicate Head/Tail Commands</summary>

Write a shell scripts which works similar to the Unix commands Head Tail.

```sh
// Some code
```

</details>

<details>

<summary>EXPT10: Shell Script for Basic Math Ops</summary>

Write a shell script to find the sum, the average and the product of the four integers entered.

```sh
// Some code
```

</details>

<details>

<summary>EXPT11: User Log in Info</summary>

Write a shell script to find how many terminals has this user logged in.

```sh
// Some code
```

</details>

<details>

<summary>EXPT12: Shell Script for Number Reversal</summary>

Write a shell script to reverse a number supplied by a user.:

```sh
// Some code
```

</details>

<details>

<summary>EXPT13: Shell Script for Power Finding</summary>

Write a script to find the value of one number raised to the power of another.:

```sh
// Some code
```

</details>

<details>

<summary>EXPT14: Shell Script for File Existence Check</summary>

Write a shell script, which will receive any number of filenames as arguments. The shell script should check whether such files already exist.

```sh
// Some code
```

</details>

<details>

<summary>EXPT15: File Contents Reversal</summary>

Write a shell script to reverse the contents of a file:.

```sh
// Some code
```

</details>

<details>

<summary>EXPT16: Count No of entries in subdirectory at path</summary>

Write a script to count and report the number of entries in each subdirectory mentioned in the path, which is supplied as a command-line argument.

```sh
// Some code
```

</details>

<details>

<summary>EXPT17: Shell Script for Basic Math Ops using cmd line args</summary>

Write a shell program to add, subtract and multiply the 2 given numbers passed as command line arguments:

```sh
// Some code
```

</details>

<details>

<summary>EXPT18: Menu Driven Shell Script</summary>

Write a menu driven shell script for Copy a file, remove a file, Move a file.

```sh
// Some code
```

</details>

{% embed url="<https://mantavyam.notion.site/18152f7cde8880d699a5f2e65f87374e>" %}
Get Credited for sharing your Knowledge Source with your Peers
{% endembed %}

{% embed url="<https://mantavyam.notion.site/17e52f7cde8880e0987fd06d33ef6019>" %}
Submit Queries/Feedbacks/Suggestions/Complaints using this Form
{% endembed %}
