JNTU BTech II Semester UNIX PROGRAMMING, Examinations, Apr/May 2008

JNTU B.Tech II Semester UNIX PROGRAMMING, Examinations, Apr/May 2008

(Computer Science and Engineering)

Time: 3 hours Max Marks: 80

Answer any FIVE Questions

All Questions carry equal marks

SET-IV

1. Explain various commands available in UNIX for networking. Discuss suitable examples. [16]

 

2. Which is the command used for ordering a file? Discuss all the options available for this command. For every option explain with an example. [16]

 

3. (a) Write a shell script which will receive any number of filenames as arguments. The shell script should check whether every argument supplied is a file or a directory. If it is a directory it should be appropriately reported. If it is a Filename then name of the file as well as the number of lines present in it should be reported.

(b) Write a C program to simulate ‘tail’ command. [8+8]

 

4. (a) Write a shell script which gets executed the moment the user logs in. It should display the message “good morning/good afternoon/good evening” depending upon the time at which the user logs in.

(b) Explain about here documents with an example. [8+8]

 

5. Write the syntax of following system calls.

(a) open

(b) creat

(c) read

(d) write. [16]

 

6. Write a program which uses abort function. [16]

 

7. Write about different Unix locking techniques. [16]

 

8. Explain the concept of IPC between two processes on a single system. Give Example. [16]

Leave a Comment