Jawaharlal Nehru Technological University Hyderabad

Jawaharlal Nehru Technological University Hyderabad B.Tech IV LINUX PROGRAMMING Previous Question Paper (September - 2020 - R16)

B.Tech | IV | II | R16 | September - 2020

Answer PaperPaper Code: 138GHMaximum Marks: 75Time: 2 Hours

Answer any Five Questions. All Questions Carry Equal Marks.

Main

115 marks
a

Explain briefly about various backup utilities and process utilities with syntax, options and example for each.

8 marks

Answer

Backup utilities are used to archive and compress files for data protection, while process utilities manage and monitor running tasks.

Backup Utilities:

  1. tar (Tape Archive): Used to create or extract archives. Syntax:
    tar [options] [archive-file] [file/directory]
    Options: -c (create), -x (extract), -v (verbose), -f (file). Example:
    tar -cvf backup.tar /home/user/docs
  2. gzip: Used for compression. Syntax:
    gzip [options] [filename]
    Option: -d (decompress). Example:
    gzip file.txt

Process Utilities:

  1. ps (Process Status): Displays information about active processes. Syntax:
    ps [options]
    Options: -e (all processes), -f (full format). Example:
    ps -ef
  2. top: Provides a dynamic real-time view of running processes. Syntax:
    top
  3. kill: Sends a signal to terminate a process. Syntax:
    kill [signal] [PID]
    Example:
    kill -9 1234
b

Discuss briefly about I/O redirection operators in Linux.

7 marks

Answer

I/O redirection allows users to change the standard input, output, or error streams of a command.

  • Output Redirection (>): Redirects standard output to a file, overwriting existing content. Example:
    ls > list.txt
  • Append Redirection (>>): Appends standard output to the end of a file without overwriting. Example:
    echo "data" >> log.txt
  • Input Redirection (<): Redirects standard input from a file instead of the keyboard. Example:
    sort < input.txt
  • Error Redirection (2>): Redirects only the error messages (stderr) to a file. Example:
    command 2> error.log
  • Combined Redirection (&>): Redirects both standard output and standard error to the same file. Example:
    command &> output.log
  • Pipe (|): Takes the output of one command and uses it as the input for another. Example:
    ls | grep 'txt'
215 marks
a

Differentiate between chown(), fchown() and lchown() functions.

7 marks

Answer

Sign in to view the complete answer paper.

b

Illustrate the need of lseek() function with an example code.

8 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

With the help of a program, illustrate the use of exit() and _exit() system calls.

8 marks

Answer

Sign in to view the complete answer paper.

b

Give a brief description on real IDs and effective IDs.

7 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

List and explain various APIs related to Message Queue IPC mechanism.

8 marks

Answer

Sign in to view the complete answer paper.

b

Write about kernel support for messages.

7 marks

Answer

Sign in to view the complete answer paper.

5

Explain briefly about the following socket APIs with clear syntax:

a) socket() b) connect() c) send()

15 marks

Answer

Sign in to view the complete answer paper.

615 marks
a

Discuss various system commands in awk.

7 marks

Answer

Sign in to view the complete answer paper.

b

Write a shell script to illustrate the ‘cp’ command without using it.

8 marks

Answer

Sign in to view the complete answer paper.

7

Explain the following file I/O system calls:

a) open() b) read() c) write() d) close()

15 marks

Answer

Sign in to view the complete answer paper.

815 marks
a

Differentiate between fork() and vfork() system calls.

7 marks

Answer

Sign in to view the complete answer paper.

b

Demonstrate alarm(), pause(), abort(), sleep() functions.

8 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of LINUX PROGRAMMING from Jawaharlal Nehru Technological University Hyderabad for B.Tech EEE IV II, September - 2020, R16.

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...