Bca Bca 502 Unix and Shell Programming 2012

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

http://www.makaut.

com

Name : …………………………………………….………………
Roll No. : …………………………………………...……………..
Invigilator’s Signature : ………………………………………..

CS/BCA/SEM-5/BCA-502/2012-13

2012
UNIX AND SHELL PROGRAMMING
Time Allotted : 3 Hours Full Marks : 70

The figures in the margin indicate full marks.


Candidates are required to give their answers in their own words
as far as practicable.

GROUP – A
( Multiple Choice Type Questions )
1. Choose the correct alternatives for the following : 10 × 1 = 10
i) To counting number of lines in a file which command is
used
a) cat b) ls
c) wc d) chmod.
ii) In the core of the operating system is called
a) hardware b) kernel
c) shell d) X-window.
iii) Which one works as interface between the user & the
kernel ?
a) Hardware b) Kernel
c) Shell d) X-window.

5145 [ Turn over


CS/BCA/SEM-5/BCA-502/2012-13

iv) To display an informative listing of the users ...............


is used.

a) who b) ls

c) both (a) and (b) d) none of these.

v) To remove a directory .................. command is used.

a) rmdir b) mkdir

c) tree d) none of these.

vi) To know your current directory we use

a) cd b) chmod

c) both (a) and (b) d) pwd.

vii) The UNIX command 'cp ch * book'

a) copies all files starting with ch to the directory


book

b) copies all files with three character names and


starting with ch to the directory book

c) compares whether file starting with ch exists in


directory book

d) none of these.

viii) Suppose the current directory is / home / user / xyz /


prog. A possible command to change to a directory /
home / user / abc / letter is

a) cd .. / .. / abc / letter

b) cd ./ ./ abc / letter

c) cd ./ home / user / abc / letter

d) none of these.

5145 2
CS/BCA/SEM-5/BCA-502/2012-13

ix) The UNIX command 'rm –r project' will

a) delete the file project from the current directory

b) delete all the files from the directory project

c) recursively delete the directory project and all its


sub-directories

d) none of these.

x) The hidden file in UNIX

a) have a special status bit associated with the file


descriptor

b) have names starting with a dot

c) can be accessed only by the operating system


kernel

d) none of these.

GROUP – B

( Short Answer Type Questions )

Answer any three of the following 3 × 5 = 15

2. How do you change File Access Permissions in Unix ?

3. What is i-node ? Explain fields of an i-node. 2+3

4. Discuss mount and unmount system calls.

5. What happens when you execute a program ? Define zombie.

3+2

6. Define hard link and soft link.

5145 3 [ Turn over


CS/BCA/SEM-5/BCA-502/2012-13

GROUP – C
( Long Answer Type Questions )

Answer any three of the following. 3 × 15 = 45


7. Describe mechanism of process creation. How a shell is
created ? What are internal and external commands ? Where
are the security levels available in UNIX ? 5+3+4+3
8. Define kill command. How you can kill the last background
job ? How you can execute a low priority job before a high
priority job ? What are the different environment variables in
Unix ? Explain ps command. 2+3+3+3+4
9. What are piping operators ? What is redirection ? Describe
different redirection operators. Write a shell script to find out
prime numbers within 100 to 500. 2+2+3+8
10. a) What is quoting ? What are three quote tokens ?
b) What is regular expression ? List out the components
of it.
c) What are egrep and fgrep ? Give examples.
d) Differentiate between line editor and screen editor.
(2+2)+4+4+3

11. Write short notes on any three of the following : 3×5


a) gzip and gunzip
b) awk
c) tar
d) Common shells in Unix.
=============

5145 4

You might also like