JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech III LINUX PROGRAMMING Previous Question Paper (November/December - 2018 - R13)
Note: This question paper contains two parts A and B. Part A is compulsory which carries 25 marks. Answer all questions in Part A. Part B consists of 5 Units. Answer any one full question from each unit. Each question carries 10 marks and may have a, b, c as sub questions.
Part A
Explain the significance of the following commands: i) ls –r ii) ls -R
Answer
i) ls -r: Lists the contents of a directory in reverse alphabetical order. ii) ls -R: Lists the contents of a directory recursively, including the contents of all subdirectories.
Assuming that a file’s current permissions are rw-r-xr--, specify the chmod expression required to change them to: i) rwxrwxrwx ii) r--r----- iii) --r--r---
Answer
i) chmod 777 filename (or chmod a=rwx filename) ii) chmod 440 filename (or chmod u=r,g=r,o= filename) iii) chmod 044 filename (or chmod u=,g=r,o=r filename)
What is a symbolic link?
Answer
Sign in to view the complete answer paper.
Give umask file access permission bits.
Answer
Sign in to view the complete answer paper.
Distinguish between malloc and calloc in C language.
Answer
Sign in to view the complete answer paper.
What are the different causes for the abnormal termination of a process?
Answer
Sign in to view the complete answer paper.
Give the syntax of popen and pclose functions.
Answer
Sign in to view the complete answer paper.
Distinguish between named and unnamed pipes.
Answer
Sign in to view the complete answer paper.
What are various socket types?
Answer
Sign in to view the complete answer paper.
Distinguish between connection-oriented and connection-less protocol.
Answer
Sign in to view the complete answer paper.
Part B
Write a shell script that displays a list of all files in the current directory to which the user has read, write and execute permissions.
Answer
Sign in to view the complete answer paper.
Explain the following networking commands in unix: i) ping ii) traceroute iii) netstat iv) nslookup v) ifconfig
Answer
Sign in to view the complete answer paper.
Write an awk script to find the number of characters, words and lines in a file.
Answer
Sign in to view the complete answer paper.
Give an overview of sed to manipulate text in UNIX.
Answer
Sign in to view the complete answer paper.
Give an overview of the structure of the UNIX file system.
Answer
Sign in to view the complete answer paper.
Explain the following functions of file system in UNIX: i) chmod ii) chown iii) truncate.
Answer
Sign in to view the complete answer paper.
Give an overview of four stat functions and the information they return.
Answer
Sign in to view the complete answer paper.
Give the functions for reading directories and explain.
Answer
Sign in to view the complete answer paper.
What are different exec functions in UNIX process control? Explain.
Answer
Sign in to view the complete answer paper.
Give an overview of process groups and sessions.
Answer
Sign in to view the complete answer paper.
Explain UNIX environment variables and the functions for fetching and setting environment variables.
Answer
Sign in to view the complete answer paper.
Explain the significance of following signals: i) SIGCHLD ii) SIGINT iii) SIGSYS iv) SIGKILL
Answer
Sign in to view the complete answer paper.
What are different forms of IPC? Explain.
Answer
Sign in to view the complete answer paper.
Demonstrate with an example implementation of client-server model using pipes.
Answer
Sign in to view the complete answer paper.
Give an overview of implementation of semaphores in UNIX.
Answer
Sign in to view the complete answer paper.
Give the syntax and semantics of following socket functions: i) bind ii) connect
Answer
Sign in to view the complete answer paper.
Give the functions for setting and retrieving socket options, and give the list of various socket options.
Answer
Sign in to view the complete answer paper.
Give the syntax and semantics of the following socket functions: a) send b) sendto c) recv d) recvfrom
Answer
Sign in to view the complete answer paper.