0% found this document useful (0 votes)
5 views6 pages

Comprehensive Guide to UNIX Commands and Concepts

The document outlines a comprehensive syllabus for a UNIX operating system course, divided into five modules. It covers various topics including commands, file permissions, shell scripting, process management, inter-process communication, and signals. Each module contains multiple questions and tasks aimed at assessing the understanding and practical application of UNIX concepts.

Uploaded by

keerthimrao05
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views6 pages

Comprehensive Guide to UNIX Commands and Concepts

The document outlines a comprehensive syllabus for a UNIX operating system course, divided into five modules. It covers various topics including commands, file permissions, shell scripting, process management, inter-process communication, and signals. Each module contains multiple questions and tasks aimed at assessing the understanding and practical application of UNIX concepts.

Uploaded by

keerthimrao05
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MODULE 1

1. With the example, explain the following commands. i)man ii)pwd iii)od iv) cal v)date
2. With a neat diagram, explain the kernel and shell relationship in UNIX operating System.
3. Explain the salient features of Unix Operating System
4. Differentiate between Internal and External commands in UNIX operating system with
example.
5. Explain with a figure, the kernel and shell relationship in Unix Operating System. (8M)
6. What is the use of following commands: echo, ls, who. (6M)
7. List and explain the salient features of Unix Operating System. (8M)
8. Explain the use of following commands: printf, passwd, cal. (6M)
9. Differentiate between internal & external commands inn unix with suitable examples
(8M)
[Link] explain HOME, PATH, wc, pwd. (6M)
[Link] the outputs of the following commands.
1. cal 8 1984
2. echo ‘Today date is ‘date’ ‘
3. date “Date is: %d %h %Y”. (3M)
[Link] an ordinary user can become a super user and vice versa? Explain with suitable
commands. (4M)
[Link] the command line to perform the followings:
1. Change current directory to home directory.
2. Change to parent of parent directory. (2M)
[Link] the different types of Unix Environment. (5M)

MODULE 2

1. Explain ls Command with all the options.


2. Define Wild Cards? Explain various shell wild cards with suitable example.
3. Explain changing file permissions in relative and absolute manner.
4. Explain if and While control statements in shell scripts with suitable program.
5. What is a file? Explain the three categories of files in Unix operating system. (8M)
6. Explain the ls command with options. (6M)
7. Explain the following command with syntax, option & example: mkdir, rmdir, od, mv.
(6M)
8. What is parent child relationship? Explain with figure, the Unix File System. (6M)
9. Explain the chmod command to change file permission using both absolute and relative
methods. (6M)
[Link] the following command with syntax and example: cat, rm, cp, wc (8M)
[Link] the following commands and write the output.
1. ls -l | grep “^d” > file1
2. grep -v “ZEE” [Link] |wc
3. grep “8......$” file1
4. grep jai sharma [Link]
5. grep -c member file1
6. grep ^[^3] filename. (6M)
12. What are wild cards? Explain the various shell wild cards with suitable example. (8M)
[Link] the grep command with all the options. (6M)
[Link] the shell’s wild cards and write the output.
1. [a-z][1-4]*.txt
2. *.[!c][!p][!p]
3. *[0-3][A-Z]
4. chap* [!0-9]
5. chap[0-1][0-9]
6. [A-Z][a-z][0-9]* (6M)

15. Explain the three different forms of if conditional statement. (6M)


[Link] the menu driven shell script to perform the following operations.
1. List of users.
2. File in a directory.
3. Today’s date.
4. Count number of files in a directory. (8M)
17. Write a menu driven shell script using case statement to perform all arithmetic
operations. (8M)
[Link] you are in /home /kumar, which of these commands will work when executed in
sequence? Explain the proper reasons.
mkdir a/b/c → mkdir a a/b
mkdir a a/b a/b/c → rmdir a/b/c →rmdir a a/b → mkdir a/p a/q a/p/r Draw the final tree
structure for directory ‘a’.
[Link] the following command with example.
1. cd
2. pwd
3. rmdir
4. wc (5M)
[Link] command is used for listing file attributes? Explain the significance of each field in
the output. (8M)
[Link] the following commands with an example for each.
1. cp
2. rm
3. mv
4. cat (4M)
[Link] file permissions of a regular file “unix” are rw_ _w_ __ x. write chmod
expressions required to change it to the following:
1. _wxrwxr_x
2. _ _ _r_xrw_
3. rwx_ _x_ _ _
4. r_ _ _wx_ _ _.
Using both relative and absolute methods of assigning permissions. (8M)
23. Explain what these wild card pattern match.
1. [A-Z]????*
2. *[!0-9]*
3. *.[!t][!x][!t] (6M)
[Link] explain the Basic Regular Expressions & Extended Regular Expression(ERE)
metacharacters. (10M)
[Link] a regular expression to match the following.
1. A decimal number which is non negative and floating point number.
2. A valid “C” variable. (4M)
[Link] a shell program to get the details of the student Name, age, USN and gender.
Output all the details to the terminal. And also output whether the student is eligible to
vote or not with suitable message. (8M)
27. Write and explain the syntax of ‘while’ and ‘for’ loops in shell programming.
[Link] the concept of Escaping and Quoting with suitable example. (4M)
29. Explain shell interpretive cycle.(4M)
30. With example, explain the logical operators in shell programming. (5M)
[Link] a note on directory permissions with example. (4M)
[Link] the command used for creating, deleting, and change directory. Explain with the
syntax and example. (8M)

MODULE 3
1. Explain the following functions with their prototypes and examples: i) mkdir() ii) rmdir()
iii)fcntl()
2. Discuss the various UNIX system implementation.
3. With a neat diagram explain how a C program is started and terminated.
4. Explain getrlimit () and setrlimit() API’s
5. Explain the following API’s along with their prototype definition and possible cause for
failure:
1. open
2. write
3. fcntl
4. stat (12M)
6. Explain the following general file APIs:
1. open()
2. fcntl()
3. lseek() (12M)
7. Explain the working of the open function with prototype. (10M)
8. What is an API? Explain why calling an API is more time consuming than calling a user
defined function.(4M)
9. Explain the following APIs with prototypes.
1. open
2. lseek
3. chmod (6M)
[Link] the device file APIs along with a simple program. (8M)
[Link] symbolic link file API’s (8M)
[Link] a c/c++ program to emulate command in unix (4M)
[Link] the environment structure of a process and mention any Four environment
variables. (6M)
[Link] and explain the summary of starting and terminating a C program. (6M)
[Link] are the different ways in which a process can terminate normally.
[Link] a neat sketch, explain the memory layout of a C program. (6/10/8M)
[Link] in detail with prototypes the C function for memory allocation. (7M)
[Link] reasons as to why shared libraries are better with an example. (6M)
[Link] is fork and vfork? Explain with an example program for each. (8M)
[Link] the fork and vfork system call. How fork system call differes from vfork? Write a
program to demonstrate fork and vfork system calls. (10M)
[Link] exit, _exit and atexit functions with their prototypes. (8M)
[Link] a C/C++ program to demonstrate the use of atexit function. (10M)
[Link] a short notes on the following:
1. Race Condition.
2. File and Record Locking. (10M)
[Link] is a race condition ? write the program for generating race condition and to avoid
the race condition. (8M)
[Link] and explain the different forms of exec function with prototype declaration along
with meaning. Write a program to echo all its command line arguments and
environmental variables. (12M)
[Link] in detail the family of exec functions. (12M)

MODULE 4
1. Explain the fork and vfork system calls. How does fork differ from vfork?
2. Write short notes on the following with examples: i) exec() ii) Race conditions
3. What are pipes? What are its limitations? Write a program to send data from parent to
child over a pipe.
4. What is a FIFO? With a neat diagram explain client server communication using FIFO.
5. Explain “system” function with its prototype (4M)
6. Which is the fastest form of IPC? Explain (10M)
7. Explain POPEN and PCLOSE function with prototypes and demonstrate its usage with a
simple C program. (10M)
8. Write a simple C program to illustrate the concept of a co-process. (5M)
9. Write the neat diagrammatic representation of a message queue with proper labeling.
Write the data structure associated with message queue along with its elements detail.
(8M)
[Link] the appilication of FIFOs. 4
[Link] different APIs used with message Queues. (10M)
[Link] along with prototype declaration and meaning, the different types of system calls
available to create and manipulate semaphore. (4M)
13. What are semaphores? What is their purpose? List and explain the APIs used to create
and control the semaphores. (10M)
[Link] are semaphores? Explain the APIs along with the relevant data structure involved
in implementation of semaphores.

MODULE 5
1. Define Signal? Explain sigprocmask function with a program.
2. Explain Daemon characteristics and coding rules.
3. What is a daemon process? Explain coding rules and error logging.
4. Explain the following functions: i)system() ii) sleep()
5. What are signals? List any four signals along with brief explanation. Write a program to
setup signals handler for SIGALRM and SIGINT signals. (8M)
6. What are signals? Write a program to setup signal handler for the SIGINT signal using
sigaction API. (6M)
7. What is the use of setjmp and longjmp functions with examples. (8M)
8. Write the timeline or program sequence of execution for sigsetjmp and siglongjmp
handling. (8M)
9. Explain the following APIs along with their prototypes with respect to signals: kill. (3M)
10. Write the prototype of ALARM and PAUSE function and explain how they operate. (4M)
[Link] the following APIs along with their prototypes w.r.t Signals: alarm. (2M)
12. What are daemon process? Explain daemon characteristics and relation to session and
process groups. (10M)
[Link] error handling for daemon process with a neat block diagram. Write the system
library functions associated with error logging. (8M)
14. What are daemon process? Explain with a neat diagram the error logging facility for
daemon process. (10M)

You might also like