You are on page 1of 1

UNIX AND SHELL PROGRAMMING

MCA3
1) a) What is i-node ? What is the purpose of it ? In what way a programmer can use i-node ? b)
What will be the output of the command cat foo foo foo ? c) Explain the role of the set-user-id and
sticky bit. d) Write a shell script to print only those words of the file FILE, whose beginning and
last character are same.
2) a) Write a shell script to delete all files in root and its subdirectories having extension 'tmp', which
have not been created or referred to in the last 15 days. b) Explain the structure of UNIX file
system.
3) a) What is meant by command substitution ? Explain with the help of an example. b) What is
meant by daemon process ? Name any two daemon processes.
4) a) What is Kernel ? What is Shell ? b) What is the difference between absolute and relative
permission ? c) What is zombie state ?
5) a) Why is the shell called a Command Interpreter ? b) What is the significance of the PID and
the PPID ? c) What is a daemon ? What is Job ?
6) a) If x has the value 10, what are the values of (i) x$x$ (ii) $x$x ? b) What do you mean by
command substitution ? Provide example. c) What are the differences between absolute path and
relative path ?
7) a) What is mounting ? Explain with an example. b) Discuss the utility of wild card characters.
With respect to Is, explain the following : Is I file Is ab ? cd Is a [b-d][2-4]*d
8) What are system variables ? Give description of the following : HOME, PATH, LOGNAME,
PWD, PSI, PS2, SHELL, IFS.
9) Write a shell script to check whether an integer is prime or not ?
10) a) Explain 'Booting' process in UNIX O.S. b) What do the terms UID, PID and PPID stand for ?
For a currently executing process how can you obtain these values ? c) What is zombie process ?
d) What are fork and exec system calls meant for ? How are they different ?
11) a) Explain internal and external commands in UNIX. b) What are the utilities of environment
variables ? c) What are the two ways to specify pattern and action to the awk command ?
12) a) What is the use of touch command ? b) What is a background process ? How can a process be
run in background ? c) Write a shell program to store the names, size, permissions of all the
regular files present in the current directory in a file named backup.
13) How can a user be added and deleted from a UNIX system? Explain shutdown command
elaborately. How can an ordinary user become a super user? How can different files be searched in
a UNIX system? What is the job of user mask? Where do we need to use hard link?
14) What do you mean by positional parameters of shell programming? Name five administrative
functions that cannot be performed by a general user.
15) Produce a file "temp" which contains the modification and access time along with the filenames
and permission fields. The line containing the total number of blocks should not be present in the
output.
16) What are the salient features of UNIX? Describe different UNIX components. What is the SHELL
used for in UNIX? 15) What do you mean by mounting and un-mounting partitions?
17) Short notes:
a) Hard link and Soft link b) Internal and external commands c) Umask and chmod d) process creation e)
kill command f) background job execution g) UNIX booting h) filter command i) System administration.