JNTU

JNTU B.Tech III LINUX PROGRAMMING Previous Question Paper (September - 2021 - R15)

B.Tech | III | I | R15 | September - 2021

Answer PaperPaper Code: 125EDMaximum Marks: 75Time: 3 hours

Answer any five questions. All questions carry equal marks.

Main

115 marks
a

What is command substitution? What is the token used with command substitution?

8 marks

Answer

Command substitution is a feature in the Linux shell that allows the output of a command to be replaced in the command line. When a command is enclosed in specific tokens, the shell executes the command first, captures its standard output, and replaces the expression with that output before executing the surrounding command.

The tokens used for command substitution are:

  1. Backticks (`): The traditional syntax, e.g., `date`.
  2. $() syntax: The modern and preferred syntax, e.g., $(date). This method is preferred because it is easier to nest and improves readability.
b

Write a shell script to illustrate ‘cat’ command in Linux.

7 marks

Answer

The cat (concatenate) command is used to display the contents of files, create new files, or append data to existing files. The following shell script demonstrates these functionalities:

#!/bin/bash
# Script to demonstrate cat command

# 1. Display file content
echo "Displaying file content:"
cat file.txt

# 2. Create a new file using cat
echo "Creating newfile.txt..."
cat > newfile.txt <> newfile.txt <
215 marks
a

Explain about file ownership function.

6 marks

Answer

Sign in to view the complete answer paper.

b

Explain briefly about text processing and process utilities.

9 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

Describe the file system structure and different file types in Linux system.

9 marks

Answer

Sign in to view the complete answer paper.

b

Explain about functions for scanning directories with syntax and examples.

6 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

Describe hard links and soft links with examples.

6 marks

Answer

Sign in to view the complete answer paper.

b

Explain the following: i) mkdir ii) rmdir iii) chdir

9 marks

Answer

Sign in to view the complete answer paper.

5

Explain the following with example:

15 marks
a

Process Creation

5 marks

Answer

Sign in to view the complete answer paper.

b

Process Termination

5 marks

Answer

Sign in to view the complete answer paper.

c

Signal function.

5 marks

Answer

Sign in to view the complete answer paper.

615 marks
a

Differentiate between fork( ) and vfork( ).

6 marks

Answer

Sign in to view the complete answer paper.

b

Illustrate SIGKILL and SIGINT with an example program.

9 marks

Answer

Sign in to view the complete answer paper.

7

Explain the kernel data structure for Message queue with a neat diagram. Also explain the APIs associated for message queue with an example program.

15 marks

Answer

Sign in to view the complete answer paper.

815 marks
a

Explain how to attach and detach a shared-memory segment.

7 marks

Answer

Sign in to view the complete answer paper.

b

Explain how TCP connections are established and terminated.

8 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of LINUX PROGRAMMING from JNTU for B.Tech IT III I, September - 2021, R15.

For the solved question paper with answers, switch to the Answer Paper tab.

Other papers in LINUX PROGRAMMING

Loading Question Papers

Fetching data from database...