JNTU II Sem Unix Programming Exam Paper Apr May 2008

JNTU II Sem Unix Programming Exam Paper Apr May 2008

(Computer Science and Engineering)

Time: 3 hours Max Marks: 80

Answer any FIVE Questions

All Questions carry equal marks


1. “Operating systems like UNIX provide services both for programs and users”. Justify this statement with suitable examples. [16]


2. (a) Explain the different approach taken by diff command to display file differences.

(b) Describe ‘comm’ command. Explain the output with -1,-2, or -3 options in ‘comm’ command. [8+8]


3. (a) Write a shell script which reports names and sizes of all files in a directory (directory would be supplied as an argument to the shell script) whose size is exceeding 1000 bytes. The filename should be printed in descending order of their sizes. The total number of such files should also be reported.

(b) Write a C program to search for the word ‘exam’ in a given file, using Command line arguments. [8+8]


4. (a) What is a shell? What are the responsibilities of a shell?

(b) What are the different types of shells available in unix. [8+8]


5. Write a C program to print the type of specified file (Regular, device, directory) [16]


6. (a) Write a program to illustrate the vfork function call.

(b) Write a program for signal implementation. [8+8]


7. Write a comparative study of adversary and mandatory locking. [16]


8. Write about system call pipe . Give an example which uses pipe system call. [16]

Leave a Comment