Friday, December 3, 2010

Some questions from OS LAB




SET A
Operating System Lab Quiz

1. Create a DOS batch file student.bat that examines the batch parameter %1 through %3. If a parameter is defined display the parameter’s value. If the parameter is not defined display an appropriate error message. [3]

2. Answer the following questions with respect to DOS: [3]

1. Which commands place entries in the environment?
2. How can you use SET to change your command prompt?
3. What is the function of REN command
4. what is purpose of pause command
5. How does Echo off affect pause?

3. Given the output of following: [4]
1. rm file *
2. wc < file13. ls|wc –l > file
4. mkdir abc|data abc|data2 abc




Set B

1. Create a DOS batch file student.bat that examines the batch parameter %1 through %3. If a parameter is defined display the parameter’s value. If the parameter is not defined display an appropriate error message. [2]


2. Answer the following with respect to DOS [3]:

1. How do you change existing environment’s entry value?
2. What is purpose of TEMP environment entry
3. Create a batch file which displays calendar for month of March’10


3. Given the output of following [5]:

1. rmdir abc|data abc|data2 abc
2. who >>file1
3. cat chap*>hello
4. echo $$
5. ps -l



SET C

Operating System Lab Quiz



1. Create a batch file teacher.bat that examines the batch parameter %1 through %4. If a parameter is defined display the parameter’s value. If the parameter is not defined display an appropriate error message. [2]


2. Answer the following [3]:

1. How do you change existing environment’s entry value?
2. What is purpose of TEMP environment entry?
3. Create a batch file which displays calendar for month of March’10


3. Given the output of following [5]:

a. rmdir abc|data abc|data2 abc
b. who >>file1
c. cat chap*>hello
d. echo $$
e. ps -l


SET D
Operating System Lab Quiz



1. Answer the following questions [5]:

1. What will cat fit fit fit display
2. How will you copy a directory structure tree1 tree2 ?Does it make any difference if tree2 exist?
3. What is difference between cat foo and cat > foo?
4. Delete all files and directories of the current directory through a single command?
5. Count number of lines, number of words and characters for 3 files and total count. All through a single command.

2. What is significance of these commands?[3]
a. mv $Home/include
b. cp –r t1 t2
c. mv *../bin

3. Make a menu driven program in dos using choice command [2]