0% found this document useful (0 votes)
91 views13 pages

DOS Assignment 01

This document contains an assignment report submitted by Utsav Kumar Choudhary for the course Design of Operating System. It includes details of Utsav like his name, registration number, branch, semester etc. It also contains 20 questions related to basic Unix commands like mkdir, cd, rmdir, cat, mv, cp, rm etc. For each question, the required command is given and the output of the command is displayed.

Uploaded by

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

DOS Assignment 01

This document contains an assignment report submitted by Utsav Kumar Choudhary for the course Design of Operating System. It includes details of Utsav like his name, registration number, branch, semester etc. It also contains 20 questions related to basic Unix commands like mkdir, cd, rmdir, cat, mv, cp, rm etc. For each question, the required command is given and the output of the command is displayed.

Uploaded by

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

Assignment Report

On
Design of Operating System (CSE 4049)

Submitted by

Name : Utsav kumar choudhary


Reg. No. : 2141003017
Branch : CSE
Semester : 5th
Section :E
Session : 2023-2024
Admission Batch : 2021

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING


FACULTY OF ENGINEERING & TECHNOLOGY (ITER)
SIKSHA ‘O’ ANUSANDHAN DEEMED TO BE UNIVERSITY
BHUBANESWAR, ODISHA – 751030
CONTENT

Assignment Name of the Assignment Remarks


No.
1 Basic Commands in Unix Operating
System.
Laboratory Assignment #01
On
Design of Operating System (CSE 4049)

Submitted by

Name : Utsav kr. Choudhary


Reg. No. : 2141003017
Semester : 5th
Branch : CSE
Section :E
Session : 2023-2024
Admission Batch : 2021

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING


FACULTY OF ENGINEERING & TECHNOLOGY (ITER)
SIKSHA ‘O’ ANUSANDHAN DEEMED TO BE UNIVERSITY
BHUBANESWAR, ODISHA – 751030
Objective of this Assignment:
To study the basic commands such as who, who am i, date, cal, pwd, man, mkdir, cd, rmdir, cat, mv,
cp, rm, wc, sort, head, tail, cmp, diff, ls, chmod, grep, echo for accessing files and directories.

Question1:
Write the commands to create the following directory hirarchy:
-> DOS_Regdno ->DOSass1->dir1

Command:
mkdir DOS__2141003017
cd DOS__2141003017
mkdir DOSass1
cd DOSass1
mkdir dir1

Output:

Question2:
Write the commands to create another directory with name dir2 in directory DOSass1 and make
dir2 as the current working directory.

Command:
mkdir dir2
cd dir2
pwd

Output:
Question3:
Write the command to delete the directory dir2 , when DOS_Regdno will be the current working
directory.

Command:
Cd ..
cd ..
rmdir DOSass1/dir2
cd DOSass1
ls
Output:

Question4:
Write the command to create a file named as file1 using cat command inside dir1. Write your
name, regdno, branch, semester and section in file1. Then display the content of the file.

Command:
Cd dir1
cat > file1
Name: Utasv choudhary
Regdno: 2141003017
Branch: CSE
Semester: 5th
Section: E
Cat file1

Output:
Question5:
Write the command to create a file named as file2 using cat command inside dir1. Write your
semester wise SGPA in file2.

Command:
cat >file2
Sgpa:-
11
11
11
11

Output:

Question6:
Create a file named as file3 storing content of file1 merged with content of file2.

Command:
cat > file2
Sgpa:-
11
11
11
11

Output:
Question7:
Write the command to rename file2 as markinfo.

Command:
mv file2 markinfo
ls

Output:

Question8:
Write the command to copy the content of file1 to reginfo.

Command:
cp file1 reginfo
ls

Output:

Question9:
Write the command to display the inode values of file1,markinfo, reginfo

Command:
ls -I file1
ls

Output:
Question10:
Write the command to delete file1.

Command:
rm file1
ls

Output:

Question11:
Write the command to count the number of lines, words, characters in markinfo.

Command:
wc markinfo

Output:

Question12:
Write the command to create a file named as Personalinfo inside dir1. Write your name, regdno,
address in the file.

Command:
cat > personalinfo
Name: utsav choudhary
Redgno:2141003017
Address:Student
cse Branch
Ranchi,834001

Output:
Question13:
Write the command to display the content of markinfo in reverse order

Command:
sort -r markinfo

Output:

Question14:
Check the output of the following command:
cmp reginfo personalinfo
diff reginfo personalinfo

Command:
cmp reginfo personalinfo
diff reginfo personalinfo

Output:
Question15:
Write a command to count the number of files in the current working directory and display that
number

Command:
ls | wc -l

Output:

Question16:
Write a command to include all the file names present in a current working directory in a file
named as filelist without causing filelist to be included in the names

Command:
ls > filelist
cat filelist

ls | grep -v filelist > filelist


cat flielist

Output:

Question17:
Write a command to give write permission to all the users of file reginfo.

Command:
chmod a+w reginfo
ls -l reginfo

Output:

Question18:
Write a command to discard write permission from group users group users of file reginfo.

Command:
chmod g-w reginfo

ls -l reginfo

Output:

Question19:
Write the command to set rwx permissions for all the users of file reginfo.

Command:
chmod a+rwx reginfo

ls -l reginfo

Output:

Question20:
Differentiate between following commands:
date; pwd
date; pwd | wc -l
(date; pwd) | wc -l
Command:
date; pwd
date; pwd | wc -l
(date; pwd) | wc -l

Output:

Question21:
Interpret the output of the following commmands:
echo *
echo ***
echo '***'
echo \***
echo \*\*\*
echo */*
echo Don't do this
echo “Don't do this” (Quotes of one kind protect quotes of other kind)
echo Hello # world
echo “ Hello # world”
echo ' Hello # world'
echo date
echo 'date'
echo “date”
echo `date`

Command:
echo *
echo ***
echo '***'
echo \***
echo \*\*\*
echo */*
echo Don't do this
echo “Don't do this” (Quotes of one kind protect quotes of other kind)
echo Hello # world
echo “ Hello # world”
echo ' Hello # world'
echo date
echo 'date'
echo “date”
echo `date`

Output:

You might also like