0% found this document useful (0 votes)
11 views

OSY MP PPT

Uploaded by

Aafiya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

OSY MP PPT

Uploaded by

Aafiya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

Anjuman-I-Islam

M.H. Saboo Siddik


Polytechnic
Prepared by:
210403- Ansari Midhat
210411- Welder Umme Haani

Branch: CO
Sem: 5th
Sub: Operating System
(22516)
Year: 2023-24
Topic:
working with linux terminals &
basic commands, file &
directory manipulation
commands & fifo page
replacement algorithm

2
Sr No. Commands Syntax Description
1. who $who It is used to display who are the users
connected to our computer currently

2. who am i $who am i Display the details of the current


working directory

3. login login: Prompt, enter username


$username
4. passwd $passwd Sets password for users
uname
5.
su(sudo) $su ls Provides super user privileges
pwd(Present $pwd To print the complete path of the current
6. Working working directory
Dir)

3
4
 ls command: It is used to lists files in the current working directory.

Syntax: $ls

Options Meaning

ls -a list all files including hidden file starting with'.'

ls -d list directories – with '*/'


ls -i list file's inode index number

ls -1 list with long format - show permissions

5
6
 rm command: Used to remove the file
Syntax: $rm filename

Example:
$rm abc.txt Removes abc.txt
$rm abc.txt xyz.txt Removes abc.txt and xyz.txt files
$rm * Removes all files

 mv command: It is used to move a file from one


location to another.
Syntax: mv [Option] source destination
Options:
-i (Interactive): The mv command with -i option ask for
confirmation
$ mv -i abc.txt aab.txt

7
 cp command: It is used to copies a file to destination file.
If the command contains two file names, then it copies the
contents of 1st file to the 2nd file. If the 2nd file doesn't exist, then
first it creates one and content is copied to it.
But if it existed then it is simply overwritten without any warning.

Syntax: $ cp sourcefile destinationfile

8
 cat command: It is used to create the file and displaying the contents
of file/files.

Syntax:
$ cat >sample (To create a file)
This is sample file in Unix.

<cntrl d>
$ cat sample
where cat is a command and sample is argument. This is sample file in
Unix. User can display contents of more than one file and called as
concatenation.
$ cat listl.txt list2.txt (List two files at a time)

9
 touch command: It is the easiest way to
create new, empty files.
Syntax:
$touch filename

Example:
$touch aaa

10
 cd command: Used to change directory.
You can use it to change to any directory by
specifying a valid path.

Syntax:
$cd<directoryname>

Example:
$cd/ Changes to root
directory
$cd..

11
12
 pwd command: pwd stands for Present Working
directory. Used to see specific directory
Syntax:
$pwd

13
14
First In First Out (FIFO):

This is the simplest page replacement algorithm.


In this algorithm, the operating system keeps
track of all pages in the memory in a queue, the
oldest page is in the front of the queue. When a
page needs to be replaced page in the front of the
queue is selected for removal.

15
Example:
Consider page reference string 1, 3, 0, 3, 5, 6,
3 with 3 page frames. Find the number of
page faults.

16
Initially, all slots are empty, so when 1, 3, 0 came
they are allocated to the empty slots —> 3 Page
Faults.
when 3 comes, it is already in memory so —> 0
Page Faults. Then 5 comes, it is not available in
memory so it replaces the oldest page slot i.e 1.
—>1 Page Fault. 6 comes, it is also not available
in memory so it replaces the oldest page slot i.e 3
—>1 Page Fault. Finally, when 3 come it is not
available so it replaces 0 1 page fault.

17
THANK
YOU !

18

You might also like