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
1. Explain various commands available in UNIX for networking. Discuss suitable examples. 
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. 
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.
(d) write. 
6. Write a program which uses abort function. 
7. Write about different Unix locking techniques. 
8. Explain the concept of IPC between two processes on a single system. Give Example.