1 (a)
Describe briefly the major features of the UNIX operating system.
8 M
1 (b)
Define a file with example, explain the three categories of files supported by UNIX.
6 M
1 (c)
Briefly describe:
i) System calls
ii) PATH
iii) HOME
i) System calls
ii) PATH
iii) HOME
6 M
2 (a)
Explain the significance of all the fields of 'ls - l' output. Which of the attributed can be changed only by the super user?
8 M
2 (b)
With a neat diagram, explain the three modes of vi editor.
6 M
2 (c)
Assuming that a file's current permission are rw-r-xr--. Specify the chmod expression (using both relative and absolute methods) required to change them to
i) rwx rwx rwx
ii) r_ _ r_ _ _ _ _
iii) _ _ _ r_ _ r_ _
i) rwx rwx rwx
ii) r_ _ r_ _ _ _ _
iii) _ _ _ r_ _ r_ _
6 M
3 (a)
Devise wild-card patterns to match file names:
i) Comprising of atlest three characters where the first char is numeric and the last char is not alphabetic.
ii) With three character extension except the one with .log extension.
iii) Containing 2004 as an embedded string except at the beginning or end.
i) Comprising of atlest three characters where the first char is numeric and the last char is not alphabetic.
ii) With three character extension except the one with .log extension.
iii) Containing 2004 as an embedded string except at the beginning or end.
6 M
3 (b)
Explain the three distinct phases of process creation. How is the shell created?
8 M
3 (c)
What are environment variables? Briefly describe any five of them.
6 M
4 (a)
Distinguish between hard link and symbolic links with suitable examples.
8 M
4 (b)
Describe the sort filter and illustrate its usage with -k, -u, -n, -r and -c options.
6 M
4 (c)
i) Use find to locate all files named a.out and all C source files in your home directory tree and remove them interactively.
ii) Display only the names of all user who are logged in and also store that result in user.txt
iii) Invoke the vi editor with the last modified file.
ii) Display only the names of all user who are logged in and also store that result in user.txt
iii) Invoke the vi editor with the last modified file.
6 M
5 (a)
Explain with suitable examples, the sed filter along with its two forms of addressing. Also describe in brief the substitution feature provided by sed.
8 M
5 (b)
Describe the grep filter along with any five options.
6 M
5 (c)
i) Use sed to delete all blanks lines from a file named sample.
ii) Use grep to list only the sub-directories in the current dictionary.
iii) Replace all occurrences of the word "UNIX" with "LINUX" in a file named sample.
ii) Use grep to list only the sub-directories in the current dictionary.
iii) Replace all occurrences of the word "UNIX" with "LINUX" in a file named sample.
6 M
6 (a)
Define a shell script. What are the two ways of running a shell script? Write a shell script to accept pattern and a file and search for the pattern in the file.
8 M
6 (b)
Explain the shell's for loop giving the possible sources of the list.
6 M
6 (c)
Write a menu-driven shell script to perform the following:
i) List of user who are logged in.
ii) List of files in the current directory
iii) List of processes of user
iv) Today's date
v) Quit to UNIX
i) List of user who are logged in.
ii) List of files in the current directory
iii) List of processes of user
iv) Today's date
v) Quit to UNIX
6 M
7 (a)
Describe the awk filter with syntax and example. How are awk arrays different from the ones used in most programming language?
8 M
7 (b)
Explain the looping constructs supported by awk.
6 M
7 (c)
Briefly describe the built-in-functions supported by awk for arithmetic and string operations.
6 M
8 (a)
With examples, explain the string handling functions supported by perl.
8 M
8 (b)
How are split and join used in perl scripts?
6 M
8 (c)
Write a perl script to determine whether a year is leap year or not.
6 M
More question papers from Unix and Shell Programming