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

Assignment1 Command Related Que DOS

Uploaded by

gudulabanshika
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Assignment1 Command Related Que DOS

Uploaded by

gudulabanshika
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Laboratory Assignment 1

Subject: Design Principles of Operating Systems


Subject code: CSE- 3249

Assignment 1: Basic Commands in Unix Operating System.

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.
1) Write the commands to create the following directory hirarchy:
-> DOS_Regdno ->DOSass1->dir1

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

3) Write the command to delete the directory dir2 , when DOS_Regdno will be the current
working directory.

4) 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.

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

6) Create a file named as file3 storing content of file1 merged with content of file2.

7) Write the command to rename file2 as markinfo.


8) Write the command to copy the content of file1 to reginfo.
9) Write the command to display the inode values of file1,markinfo, reginfo.
10) Write the command to delete file1.
11) Write the command to count the number of lines, words, characters in markinfo.

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

13) Write the command to display the content of markinfo in reverse order.

14) Check the output of the following command:


cmp reginfo personalinfo
diff reginfo personalinfo
15) Write a command to count the number of files in the current working directory and
display that number.

16) 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.

17) Write a command to give write permission to all the users of file reginfo.
18) Write a command to discard write permission from group users group users of file
reginfo.
19) Write the command to set rwx permissions for all the users of file reginfo.

20) Differentiate between following commands:


date; pwd
date; pwd | wc -l
(date; pwd) | wc -l

21) 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`

You might also like