Lab Manual Unix and Linux Programming PR Cot 218 and It 214
Lab Manual Unix and Linux Programming PR Cot 218 and It 214
L T P
3 1
1. Linux Startup
User accounts, accessing linux — starting and shutting processes, Logging in and Logging out, Command
line, simple commands
2. Shell Programming
Unix file system: Linux/Unix files, inodes and structure and file system related commands, Shell as
command processor, shell variables, creating command substitution, scripts, functions, conditionals, loops,
customizing environment
4. The C Environment
The C compiler, vi editor, compiler options, managing projects, memory management, use of makefiles,
dependency calculations, memory managemen—t dynamic and static memory, building and using static and
dynamic libraries, using ldd, soname, dynamic loader, debugging with gdb
5. Processes in Linux
Processes, starting and stopping processes, initialization processes, rc and init files, job control at, batch,
cron, time, network files, security, privileges, authentication, password administration, archiving, Signals and
signal handlers, Linux I/O system
Books
1. John Goerzen: Linux Programming Bible, IDG Books, New Delhi, 2000.
2. Sumitabha Das: Your Unix — The Ultimate Guide, TMH, 2000.
3. Mathew: Professional Linux Programming, vol.1 & 2, Wrox-Shroff, 2001.
4. Welsh & Kaufmann: Running Linux, O’Reiley & Associates, 2000.
L T End Semester: 60
3 1 Mid Semester: 40
1. Linux Startup
User accounts, accessing Linux — starting and shutting processes, Logging in and Logging out, Command
line, simple commands
2. Shell Programming
Unix file system: Linux/Unix files, inodes and structure and file system related commands, Shell as
command processor, shell variables, creating command substitution, scripts, functions, conditionals,
loops, customizing environment
4. The C Environment
The C compiler, vi editor, compiler options, managing projects, memory management, use of
makefiles, dependency calculations, memory management — dynamic and static memory, building
and using static and dynamic libraries, using ldd, soname, dynamic loader, debugging with gdb
5. Processes in Linux
Processes, starting and stopping processes, initialization processes, rc and init files, job control — at,
batch, cron, time, network files, security, privileges, authentication, password administration, archiving,
Signals and signal handlers, Linux I/O system
BOOKS
1. John Goerzen: Linux Programming Bible, IDG Books, New Delhi, 2000.
2. Sumitabha Das: Your Unix — The Ultimate Guide, TMH, 2000.
3. Mathew: Professional Linux Programming, vol.1 & 2, Wrox-Shroff, 2001.
4. Welsh & Kaufmann: Running Linux, O’Reiley & Associates, 2000.
Lab Instructions
Several ?
Students write experiments in practical files and get them signed by the lab teacher
practicals / programs
Students make entries in the list of contents of the practical files and get them signed by the lab teacher
Whether
Assign all practicals /programs among all groups
practical has ?
Teacher decides whether the completed practicals / programs can be appropriately described
been verified
using flow chart, algorithm, query statement, etc.
and signed by
Teacher issues necessary instructions
the lab to the students for writing practicals / programs
teacher?
accordingly
several practicals /programs
Whether
an One
experiment practical /
contains program
one or
In case of an experiment containing several practicals, a lab teacher needs to think whether a practical performed b
A practical performed by the students in one group needs to be repeated as assignments to be completed by the st
A practical performed by the students in one group needs to be repeated as assignments, only writing practicals in t
Lab Manual
Unix and Linux Programming
(Pr) COT-218 and IT-214
L T Practical exam: 40
P Sessional: 60
- -
3
Experiment 2 (C programs)
I. Write a C program to check whether the given string is palindrome or not using
Command line substitution.
II. Write a C program to emulate the UNIX ls-l command.
III. Write a C program to check the given integer is prime or not.
IV. Write a C program to display Largest of three numbers.
V. Write a C program to check whether the given number is Avogadro number or not.
VI. Write a C program to find the Factorial of a given number.
VII. Write a C program that accept two integers as its arguments and computes the
value of first number raised to the power of second number.
1
Experiment 3 (Shell scripts)
I. Write a shell script program to display list of user currently logged in.
II. Write a shell script program to display “HELLO WORLD”.
III. Write a shell script program to develop a scientific calculator.
IV. Write a shell Script program to check whether the given number is even or odd.
V. Shell script Program to search whether element is present is in the list or not.
I. (a) Write a grep/egrep script to find the number of words character, words and lines in a
file.
(b) Write an awk script to develop a Fibonacci series.
II. (a) Write a perl script to compute the power of a given number.
(b) Write an awk script to display the pattern of given string or number.
Experiment 6 (programming)
2
IV. Write a program to send back a process from foreground.
V. Write a program to retrieve a process from background.
VI. Write a program to create a Zombie process.
VII. Write a program to create a child process and allow the parent to display “parent” and
the child to display “child” on the screen.
I. Write a shell script program to check variable attributes of file and processes.
II. Write a shell script program to check and list attributes of processes.
III. Shell Script program to implement read, write, and execute permissions.
IV. Shell Script program for changing process priority.
Experiment 8 (gdb)
I. To execute programs using gdb to utilize its various features like breakpoints,
conditional breakpoints.
II. Write a shell script program to include verbose Debug option for debugging.
III. Write a shell script program to include xtrace Debug option for debugging.
IV. Write a shell script program to include verbose and trace Debug option for debugging.
Experiment 9 (Installations)