You are on page 1of 5

Operating System

Assignments
Assignment 1: Write a note on DOS. It should include,
1. History of DOS
2. Features of DOS
3. Resource Management in DOS
Assignment 2 : Write all DOS commands. The writeu! should include,
1. "rief descri!tion of the command
2. #eneral synta$ of the command
3. %sage of the command
4. Fre&uently used o!tions and their descri!tions
5. '$am!le on the general command ( im!ortant o!tions
6. S!ecial features or differences from the other command
7. 'rrorcodes)'$itcodes, if any
Batch Programs
Assignment 3: Write a note on Windows *T)+,,- OS. It should include,
4. History of Windows
5. Features of Windows
6. Resource Management in Windows
Assignment 4: Write a note on .inu$. It should include,
1. History of .inu$
2. Features of .inu$
3. Resource Management in .inu$
Assignment 5 : Write all user a/aila0le .inu$ commands. The writeu! should include,
1. "rief descri!tion of the command
2. #eneral synta$ of the command
3. %sage of the command
4. Fre&uently used o!tions and their descri!tions
5. '$am!le on the general command ( im!ortant o!tions
6. S!ecial features or differences from the other command
7. 'rrorcodes)'$itcodes, if any
Assignment 5 : Linux Shell Scripts
rite a Linux Shell Script !or the !ollo"ing :
1. Dis!lay the menu for selecting from the list of Shell Scri!t 1ssignments gi/en to you.
The user should in!ut the choice of selection from the list, and on the 0asis of the choice,
a !articular shell scri!t should 0e e$ecuted.
2. Dis!lay the list current date ( time.
now="$(date)"
printf "Current date and time %s\n" "$now"

now="$(date +'%d/%m/%Y')"
printf "Current date in dd/mm/yyyy format %s\n" "$now"
Dis!lay the list current date in words.
Dis!lay the greetings 2#ood Morning3 or 2#ood 1fternoon3 or 2#ood '/ening3, according
to the system time.
hour=$(date +"%H")

# if it is midnight to midafternoon will say G'morning
if [ $hour -ge -a $hour -!t "# $
then
greet="%ood &orning' $()*+"
, if it is midafternoon to e-ening ( .efore / 0m) wi!! say %'noon
elif [ $hour -ge "# -a $hour -!t "1 ]
then
greet="%ood 2fternoon' $()*+"
else # it is good evening till midnight
greet="%ood e-ening' $()*+"
fi

# display greet
echo $greet
Dis!lay the list of files in the current directory.
for 3i!e in 4
doif [ -r $3i!e -a -w $3i!e -a -5 $3i!e $
then
e6ho $3i!e
fi
done
Dis!lay the list of files in the directory as gi/en 0y the user in!ut.
Dis!lay the list of files in the
ascending order of file name
descending order of si4e of file
ascending order of time of creation)modification
#i/en the file name, chec5 whether it is a directory or an ordinary file or a system file or a
lin5 to a file.
If a file is a lin5 to a file, dis!lay whether it is an hard lin5 or a soft lin5.
Dis!lay the name and si4e of file, which occu!ies
ma$imum dis5s!ace
minimum dis5s!ace
#i/en the file name, dis!lay the list of files which are
hard lin5s to the gi/en file
soft lin5s to the gi/en file
#i/en the filename, the access !ri/ilege, the access !ri/ilege grou!, add or remo/e the access
!ri/ilege on the gi/en file for a gi/en grou!.
Dis!lay the list of users who are currently logged in.
#i/en the user name, find out whether the user is currently logged in or not.
#i/en the user name, dis!lay the time ela!sed, since the gi/en user is logged in.
Dis!lay the count of users who are currently logged in.
Dis!lay the - users,
who ha/e logged in first
who ha/e logged in last.
#i/en the shell scri!t filename, ma5e the shell scri!t a/aila0le to all the users of the system.
Dis!lay the total num0er of lines in a gi/en file.
Dis!lay all the comment lines a/aila0le in a gi/en file.
Find whether a 6 !rogram contains the main method or not.
Find whether a 6 !rogram has !ro!er 0loc5s in it i.e. whether the gi/en file has !ro!er
matches of starting and ending 0races i.e. 787 ( 79: .
Delete all the comment lines from a 6 !rogram.
Dis!lay the list of users and the terminals on which they are running.
Dis!lay the id:s of all shell !rocesses running on the system.
Dis!lay the count of users, who are running the shell scri!ts
Dis!lay the list of !rocesses and their !arent !rocesses.
Dis!lay the list of all child !rocesses for the gi/en !arent !rocess.
Dis!lay the list of !rocesses running on a gi/en terminal.
Find the ma$imum ( minimum of - num0ers.
#enerate a Fi0onacci series.
Write a shell scri!t to Install a Software. This includes,
creating a user for the software
co!ying all the files from 6D in the users directory
allocating res!ecti/e access !ri/ileges on those files
creating lin5 files)icons for the files
running the software.
Write a shell scri!t to Simulate the Recycle "in. This includes,
Show the recycle 0in
'm!ty the recycle 0in
Delete the gi/en file from the current directory
Delete the gi/en file from the s!ecified directory
Restore the file, from the !ath where it was deleted
If there are + files with the same name, deleted from the same !ath at different times
or different !aths, the shell scri!t should 0e a0le to maintain 0oth the deleted files
in the recycle 0in and should also 0e a0le to restore it a!!ro!riately.
Write a shell scri!t to simulate the following S;. o!erations on the Data0ase file.
The Student data0ase file consists of the following data structure. 'ach column is
se!arated from other using a s!ecial character 7<: =
Rollno > num0er?-@
*ame > char?A,@
DO" > dd)mm)yyyy
1ddress > char?A,@
De!tcode char?-@
Mar5s num0er?-@
Dis!lay all the details of all students
Dis!lay the name ( mar5s of all students
Dis!lay the rollno, name ( mar5s of students who score a0o/e B, mar5s
Dis!lay the rollno, name, address of students who are failing
Dis!lay the name ( do0 of students who are 0orn in the month of 6hristmas.
Dis!lay the rollno, name ( mar5s of students who 0elong to 6om!uter Science de!t.
Dis!lay all the students of Mechanical ( 'lectrical de!t., who are distinction holders.
Dis!lay the names of all students whose name 0egins with 7M:.
Dis!lay the names of all students whose name 0eares 7n: in the -rd !lace.
Dis!lay the names of all students whose name 0eares 7a: in the last !lace.
sdfsfsd
Linux Assignment
#isplay the gra$e or class %i&e& !irst' secon$' $istinction( o! the stu$ents a!ter getting
his mar)s&
*reet the user "hen he logs in % i! its morning then say +,i *oo$ -orning.' i! its
noon then say +,i *oo$ A!ternoon. / so on(&
#isplay the name o! the !ile "hich "as last mo$i!ie$ 0y ta)ing the $irectory name
!rom the user&
1a)e a !ilename !rom the user / ta)e a permission character !rom the user& An$
then using shell script gi2e that permission on all the !ile names %"ith same
name( in the current $irectory %inclu$ing su03$irectories( i&e& i! !1&c x is gi2en
then execute permission on all !1&c !iles
#isplay the name / si4e o! the !iles "hich occupies the max / min $is) space&
#isplay some menu / accor$ing to the input !rom user $isplay the correspon$ing
comman$&
rite a Linux shell script that $isplays all the lin)s to a particular !ile %inclu$ing
so!t lin)s / har$ lin)s( so $i!!erent shell scripts !or 0oth types o! lin)s&
5mplement 6ecycle Bin in Linux& 1hat is' sho" 6ecycle Bin' empty Bin' restore !rom
Bin' $elete particular entry !rom Bin&
*i2en a Stu$ent #ata !ile "hich consists o! roll no' !irst name' last name' city' $ate o!
0irth %$$3mm3yy(' $ept35# %alpha0etic 2 characters e&g& 7S' -8' B8' 88' 7,( /
mar)s&
6oll no 2 nos' 1
st
name 19 char' last name 19 char' city 19 char' $ate o!
0irth $$3mm3yy' $ept5# 2 char' mar)s 3 nos' $elimiter is :;<
#isplay all the recor$s o! stu$ents "hose name 0egins "ith :6<
#isplay all recor$s o! stu$ents "ho stay in Lon$on&
#isplay stu$ents "ho ha2e score$ more than =9 mar)s&
#isplay !irst / last name o! stu$ents 0elonging to 7S or -8 $ept&
#isplay names o! stu$ents 0et"een roll no 19 / 29 o! 7S $ept&
#isplay all stu$ents 0orn in 1>>9&
#isplay stu$ents "ho are !ailing %i&e& 0elo" 59 mar)s(
*i2en the 0irth $ate i! a stu$ent !in$ his age&
6eplace the city to Ahme$a0a$ !rom Baro$a !or all users& Ahme$a0a$ /
Baro$a o 0e supplie$ 0y users as input&
7alculate sum o! all !ile si4es in the current $irectory&
6emo2e a !ile gi2en 0y user' an$ re3con!irm "hether he really "ants to $elete' i! yes
then $elete an$ again as) "hether he "ants to $elete another !ile& % to call the
same program again use sh a0c&sh(
*i2en a $ate in num0er' $isplay it in "or$s&

You might also like