0% found this document useful (0 votes)
66 views

WWW - Manaresults.Co - in WWW - Manaresults.Co - In: Unix Programming

This document contains a question paper for a UNIX programming exam with 7 questions in Part A and 4 questions to be answered from Part B. The questions cover topics like system calls, file types, shells, grep commands, export commands, background processes, UNIX versions, the role of the kernel, directory structure, file systems, file permissions, shells, redirection, grep family, awk utilities, eval commands, shell scripts, trap commands, background and foreground processes, environment variables, loops, date/time scripts, and more.

Uploaded by

friend
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views

WWW - Manaresults.Co - in WWW - Manaresults.Co - In: Unix Programming

This document contains a question paper for a UNIX programming exam with 7 questions in Part A and 4 questions to be answered from Part B. The questions cover topics like system calls, file types, shells, grep commands, export commands, background processes, UNIX versions, the role of the kernel, directory structure, file systems, file permissions, shells, redirection, grep family, awk utilities, eval commands, shell scripts, trap commands, background and foreground processes, environment variables, loops, date/time scripts, and more.

Uploaded by

friend
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Code No: R1631052 R16 SET - 1

III B. Tech I Semester Regular Examinations, October/November - 2018


UNIX PROGRAMMING
(Common to Computer Science Engineering and Information Technology)

Time: 3 hours Max. Marks: 70


Note: 1. Question Paper consists of two parts (Part-A and Part-B)
2. Answer ALL the question in Part-A
3. Answer any FOUR Questions from Part-B
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

PART–A
1. a) What is a System call in UNIX? [2M]
b) What types of files are used to represent physical devices in UNIX file system? [2M]
c) List out different types of Shell. [2M]
d) Write a ‘grep’ command to print the lines that starts and ends with the word [3M]
"UNIX".
e) Explain the Purpose of export command. [3M]
f) Mention the Tasks of background processes. [2M]
PART -B
2. a) What is UNIX? List out various versions of UNIX? [4M]
b) Discuss the role of kernel in operating system. [4M]
c) With a neat sketch, explain the directory structure of UNIX operating system. [6M]

3. a) Explain the implementation details of UNIX file system. [7M]


b) Describe the attributes and permissions of a file in UNIX file system. [4M]
c) Which command is used to change the file permissions in UNIX? Explain with [3M]
an example.

4. a) What is a Shell? Explain the two different duties of a Shell. How can you [7M]
create a sub shell? How can you move to the parent shell after creating a sub
shell?
b) What is Redirection? Explain the various commands used for redirection. [7M]

5. a) Define the grep family. Mention the primary difference between fgrep and the [7M]
other two members of the grep family.
b) With a neat diagram, describe an awk utility’s view of a file and also explain [7M]
the file buffers and record buffers of awk.

6. a) What is the use of ‘eval’ command in C shell and also explain the execution of [7M]
‘eval’ command with suitable example.
b) Is it possible to pause the execution of a shell script for a specified time period? [7M]
Give explanation.

7. a) Illustrate the syntax of trap command. [7M]


b) Explain in sequence the steps to convert a background process to a foreground [7M]
process.

WWW.MANARESULTS.CO.IN
******
|''|'''||''||'''||||
Code No: R1631052 R16 SET - 2

III B. Tech I Semester Regular Examinations, October/November - 2018


UNIX PROGRAMMING
(Common to Computer Science Engineering and Information Technology)

Time: 3 hours Max. Marks: 70


Note: 1. Question Paper consists of two parts (Part-A and Part-B)
2. Answer ALL the question in Part-A
3. Answer any FOUR Questions from Part-B
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

PART –A
1. a) Difference between a System call and UNIX command. [3M]
b) Which command will list the hidden files in UNIX? [2M]
c) What is a Shell variable? [2M]
d) Write the ‘sed’ command to replace the pattern “SED” from the 7thoccurrence [3M]
to the end of file.
e) What does expr do in a shell script? [2M]
f) What is a background process in UNIX? [2M]
PART -B
2. a) With a neat sketch, explain the architecture of UNIX operating system. [7M]
b) Explain the following UNIX commands [7M]
i) mkdir ii) rm iii) tar iv) cat

3. a) What is the inode in UNIX? Where are inodes stored in UNIX file system? [7M]
Explain.
b) Explain the commands that are available in UNIX file system to change the [7M]
permissions of a file.

4. a) What is an Environment variable? List out the common environment variables [7M]
that control the user environment in Shell.
b) Compare different loops used in Shell script [3M]
c) Write a shell script to get current date, time, user name and current working [4M]
directory.

5. a) What is grep command? Explain the operation of the grep command with a [7M]
neat flowchart? And Illustrate the working of the grep command with a suitable
example.
b) Explain in brief various categories of awk patterns. [7M]

6. a) Explain the purpose of set command with an example. [7M]


b) Write a Shell script describing integer and real arithmetic [7M]

7. a) What is a Child process? How it is created? Explain the relationship between [8M]
parent process and child process.
b) Explain the use of stty command along with its syntax. [6M]

WWW.MANARESULTS.CO.IN
*****

|''|'''||''||'''||||
Code No: R1631052 R16 SET - 3

III B. Tech I Semester Regular Examinations, October/November - 2018


UNIX PROGRAMMING
(Common to Computer Science Engineering and Information Technology)

Time: 3 hours Max. Marks: 70


Note: 1. Question Paper consists of two parts (Part-A and Part-B)
2. Answer ALL the question in Part-A
3. Answer any FOUR Questions from Part-B
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

PART –A
1. a) List the Features of UNIX operating system. [3M]
b) List the Fields of aninode structure in UNIX file system. [3M]
c) What is the PATH environmental variable in UNIX? [2M]
d) Is AWK a programming language? [2M]
e) Give the Use of here document in shell script. [2M]
f) What is the Syntax of Trap command. [2M]
PART -B
2. a) Compare and contrast library function, system call and Unix command. [7M]
b) What is command substitution in a shell? Why is it important? Explain with an [7M]
example.
3. a) What are Links and Symbolic links in UNIX file system? Explain. [7M]
b) Explain the chown and chgrp commands in UNIX with an example. [7M]
4. a) Is it possible to pipe output of a command as an argument to a shell script? [7M]
Justify your answer.
b) Explain about various loop control statements of C shell with a sample [7M]
example.
5. a) Define the ‘sed’ utility? Give the format of the ‘sed’ and Explain the operation [7M]
of the ‘sed’ utility with suitable diagrams.
b) Explain the differences between grep and sed with a suitable example. [7M]
6. a) What are positional parameters? How a C shell script is invoked by passing [7M]
parameters? Explain.
b) How we know the exit status of a command in C shell? Explain. [7M]
7. a) Explain in detail about the internal and external commands in UNIX. [6M]
b) What happens to the child process when the parent process kills/dies first? [8M]
Explain with an example

*****

WWW.MANARESULTS.CO.IN
|''|'''||''||'''||||
Code No: R1631052 R16 SET - 4

III B. Tech I Semester Regular Examinations, October/November - 2018


UNIX PROGRAMMING
(Common to Computer Science Engineering and Information Technology)

Time: 3 hours Max. Marks: 70


Note: 1. Question Paper consists of two parts (Part-A and Part-B)
2. Answer ALL the question in Part-A
3. Answer any FOUR Questions from Part-B
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

PART –A
1. a) How Unix is different from other Operating Systems? [2M]
b) Interpret the command chmod 644 [2M]
c) In what way Shell variables are different from Environmental variables. [3M]
d) Write a sed command to replace the word ‘UNIX’ with ‘LINUX’ in a given [3M]
text file.
e) What does $# mean in shell script? [2M]
f) Which command displays all current terminal settings? [2M]

PART -B
2. a) What is UNIX operating system? Explain various components of UNIX [7M]
operating system.
b) Is it possible to run multiple commands of UNIX in one time? Justify your [7M]
answer with proper explanation.

3. a) Discuss the UNIX file structure and directories. [7M]


b) Explain the format of chmod and chown commands in UNIX. [7M]

4. a) What are the advantages and disadvantages of Shell scripting? [5M]


b) Write a Shell Script to display result based on the value returned from a [9M]
function call.

5. a) Compare the three utilities of the grep family with a clear explanation [7M]
b) List out the different string functions of awk utility and explain any three. [7M]

6. a) What are positional parameters in C shell scripting? Explain the meaning of [7M]
the $0, $1, $2,${9}, $*, and $#.
b) List out the important uses of exec command in shell script. [3M]
c) Write shell scripts to illustrate the use of continue and break statements. [4M]

7. a) Differentiate between Internal and External commands of UNIX. [9M]


b) Explain the importance of kill command in UNIX with examples. [5M]

*****

WWW.MANARESULTS.CO.IN
|''|'''||''||'''||||

You might also like