Jawaharlal Nehru Technological University Hyderabad
Jawaharlal Nehru Technological University Hyderabad B.Tech IV LINUX PROGRAMMING Previous Question Paper (September - 2020 - R16)
Answer any Five Questions. All Questions Carry Equal Marks.
Main
Explain briefly about various backup utilities and process utilities with syntax, options and example for each.
Answer
Backup utilities are used to archive and compress files for data protection, while process utilities manage and monitor running tasks.
Backup Utilities:
- 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
- gzip: Used for compression. Syntax: gzip [options] [filename]Option: -d (decompress). Example:gzip file.txt
Process Utilities:
- ps (Process Status): Displays information about active processes. Syntax: ps [options]Options: -e (all processes), -f (full format). Example:ps -ef
- top: Provides a dynamic real-time view of running processes. Syntax: top
- kill: Sends a signal to terminate a process. Syntax: kill [signal] [PID]Example:kill -9 1234
Discuss briefly about I/O redirection operators in Linux.
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'
Differentiate between chown(), fchown() and lchown() functions.
Answer
Sign in to view the complete answer paper.
Illustrate the need of lseek() function with an example code.
Answer
Sign in to view the complete answer paper.
With the help of a program, illustrate the use of exit() and _exit() system calls.
Answer
Sign in to view the complete answer paper.
Give a brief description on real IDs and effective IDs.
Answer
Sign in to view the complete answer paper.
List and explain various APIs related to Message Queue IPC mechanism.
Answer
Sign in to view the complete answer paper.
Write about kernel support for messages.
Answer
Sign in to view the complete answer paper.
Explain briefly about the following socket APIs with clear syntax:
a) socket() b) connect() c) send()
Answer
Sign in to view the complete answer paper.
Discuss various system commands in awk.
Answer
Sign in to view the complete answer paper.
Write a shell script to illustrate the ‘cp’ command without using it.
Answer
Sign in to view the complete answer paper.
Explain the following file I/O system calls:
a) open() b) read() c) write() d) close()
Answer
Sign in to view the complete answer paper.
Differentiate between fork() and vfork() system calls.
Answer
Sign in to view the complete answer paper.
Demonstrate alarm(), pause(), abort(), sleep() functions.
Answer
Sign in to view the complete answer paper.