Académique Documents
Professionnel Documents
Culture Documents
January 2006
PART ONE
(Answer all the questions)
1. Each question below gives a multiple choice of answers. Choose the most appropriate
one and enter in the “tear-off” answer sheet attached to the question paper, following
instructions therein. (1 x 10)
1.1 Which one of the following is used to replace a single character in “vi”?
A) O
B) x
C) r
D) N
1.2 Which one of the following lets you know the line number of the current cursor position in “vi”
?
A) <ctrl> g
B) <ctrl> <shift> g
C) <ctrl> <alt> h
D) <ctrl> h
1.3 The available disk space can be determined under Unix using the command
A) dir
B) df
C) du
D) file
1.8 Which of the following keys when pressed will generate a shell signal?
A) <shift> <ctrl> a
B) <del?
C) <ctrl> a
D) <ctrl> <del>
2. Each statement below is either TRUE or FALSE. Choose the most appropriate one and
ENTER in the “tear-off” sheet attached to the question paper, following instructions
therein. (1 x 10)
3. Match words and phrases in column X with the closest related meaning/
word(s)/phrases in column Y. Enter your selection in the “tear-off” answer sheet
attached to the question paper, following instructions therein. (1 x 10)
X Y
3.1 ~ A. Scheduling process
3.2 File restore B. Encryption of password
3.3 SMTP C. vi
3.4 IP D. HTML
3.5 /etc/shadow E. Toggle case of text in "vi"
4. Each statement below has blank space to fit one of the word(s) or phrases in the list
below. Enter your choice in the “tear-off” answer sheet attached to the question
paper, following instructions therein. (1 x 10)
PART TWO
(Answer any FOUR questions)
5.
a) Using “vi” (i) how do you save your work without leaving the editor?
Using “vi” (ii) how will you write selected lines to a file? Mention all options. Give suitable
examples.
iii) What is “yanking”? What does the “I” operator do in “vi”?
b) What do the following commands in “vi” specify? How are they used?
i) map
ii) ?pat
iii) set
iv) ab
(9+6)
6.
a) What are the advantages of having distinct disk partitions?
b) What are the components of every file system?
c) How does kernel access a file?
(5+5+5)
7.
a) How does the “login:” prompt appear?
b) What is the use of sticky bit?
c) How does cron work?
d) What does shell’s & operator do?
(4+4+5+2)
8.
a) What type of variables are PATH and HOME? Why are they called variables? In what ways
are they used? What is sed?
b) What are the advantages of cpio over tar?
c) How a client-server environment is created in X?
d) What is xterm?
(6+4+3+2)
9.
a) Write a script to check whether right number of arguments (say, 4) have been entered.
b) Consider the following table:
Using awk find the employees who are either born in 1996 or drawing a salary greater than
12000/-
c) What is grep used for? What are its various options? Give the syntax for the command.
d) What is the purpose of nice command?
JULY 2004
PART ONE
(Answer all the questions)
1. Each question below gives a multiple choice of answers. Choose the most appropriate
one and enter in the “tear-off” answer sheet attached to the question paper, following
instructions therein. (1 x 10)
1.1 Which one of the following commands changes or assigns an inode number to file?
A) cp
B) mv
C) chmod
D) chgrp
1.2 In which of the following case cmd2 does not start running until cmd1 has finished?
A) cmd1 | cmd2
B) cmd1 ; cmd2
C) cmd1 & cmd2
D) cmd1 # cmd2
1.7 The command rm xyz will lead to a dangling link, abc, if it is executed after the command
_________.
A) ln –s abc xyz
B) ln –s xyz abc
C) ln abc xyz
D) ln xyz abc
1.8 Which of the following is not a part of the inode for a file?
A) File permissions.
B) File modification time.
C) Inode modification time.
D) Name of the directory to which the file belongs.
1.10 Which of the following entries are always present in a directory file?
A) One entry that refers to the root directory and one that refers to the parent directory.
B) One entry that refers to the directory itself and one that refers to the parent directory.
C) One entry that refers to the home directory of the user and one that refers to the parent
directory.
D) One entry that refers to the root directory and one that refers to the home directory of the
user.
2. Each statement below is either TRUE or FALSE. Choose the most appropriate one and
ENTER in the “tear-off” sheet attached to the question paper, following instructions
therein. (1 x 10)
2.1 The command ls > ls.out will have ls.out in the list of the files displayed.
2.2 If a user have write permission over a directory, then it implies that the user can make
changes to the file using an editor.
2.3 The du command returns the disk utilization only for the user who invokes it.
2.4 The terminal file is a block special file.
2.5 A multiblock file is always allocated contiguous blocks on the disk.
2.6 The command $ <abc >xyz cat is a valid command.
2.7 The tar utility can also be used to backup to a diskette.
2.8 The fsck command stores the names of the unreferenced files in /lost+found.
2.9 The /mnt is the only mount point possible in UNIX system.
2.10 When a user logs out, all the processes started by the user are killed.
3. Match words and phrases in column X with the closest related meaning/
word(s)/phrases in column Y. Enter your selection in the “tear-off” answer sheet
attached to the question paper, following instructions therein. (1 x 10)
X Y
3.1 Order of search for commands A. WWW
3.2 Hidden file B. /ect/inittab
3.3 Equality operator for integers C. corn
3.4 Protocol for transfer of hypertext D. .
3.5 Read only mode E. HOME
3.6 A daemon process F. HTTP
3.7 To find and display lines in a file that contains a pattern G. =
3.8 Remote program execution H. PATH
3.9 The command init I. view
3.10 File compression J. xhost
K. view
L. grep
M. shell script name
N. -eq
O. tar -x
P. gzip
Q. HTML
R. ftp
S. chmod
T. ==
U. gunzip
4. Each statement below has blank space to fit one of the word(s) or phrases in the list
below. Enter your choice in the “tear-off” answer sheet attached to the question
paper, following instructions therein. (1 x 10)
4.1 The _________ command is used to change the priority of running process.
4.2 If the system default permissions for an ordinary file in 666 and the umask value is 022, then
permissions for the file, a, created by the command cat > a is _________.
4.4 A fully qualified domain name (FQDN) is resolved in _________ order by Domain Name
Server (DNS).
4.5 The shell Meta character _________ match any string of zero or more characters in file.
4.6 The file command differentiates between the various types of files on the basis of
_________.
4.7 The list and the number of free inode blocks available in the system is stored in _________.
4.8 The system call that stops parent process and let it resume on termination of child process is
_________.
PART TWO
(Answer any FOUR questions)
5.
a) Write an awk program, which acts like wc command, i.e., reports the number of lines, words
and characters in every file passed to it as command line argument.
b) How are the pointers to the data blocks of a file stored in its inode? Show diagrammatically
also.
(8+7)
6.
a) Differentiate between the following
i) A system call, a library function and a UNIX command.
ii) /etc/passwd and /etc/shadow
iii) User mode and kernel mode in UNIX.
(9+6)
7.
a) What will be the output of the following codes? Also explain the reason for it.
for j in a b c d e f
do
echo $ > f1
done
and
for j in a b c d e f
do
echo $j
done > f2
b) Write a shell script to read a name and display whether that person is authorized to use the
system or not. If the person is authorized, then display whether that person is currently
logged in or not.
c) List the three standard file types available in UNIX. Which standard file type is redirected
when the following shell metacharacter(s) is used in the commands: - <, >, >>, 2> and |
(pipe)?
(5+5+5)
8.
a) What is a URL? What are its various components?
b) What is setuid bit? How does it work and what is its importance?
c) What are system run-levels in Unix? How can run-level be changed from command line?
(5+5+5)
9.
a) What is the difference between internal and external commands available in UNIX? Is it
possible to create a shell script with the same name as a UNIX command? On giving that
name on the prompt, what will be executed - command or the shell script. Explain w.r.t. both
internal and external commands.
b) Write the commands or shell scripts to do the following
i) list all the ordinary files with names starting with a vowel and present in the tree
structure from the HOME directory downwards.
ii) given a file, f1 with record format as
RollNo Name Mark
(Alphanumeric field) (Alphabetic field) (Numeric field)
Sort f1 on the basic of Marks and store the result in f1.out
iii) extract the name and phone fields from a file, f2 with the record format as
Name:Age:Address:Phone
Display the data on the screen
iv) to display the list of last 10 files present in the current directory.
(7+8)
January 2004
PART ONE
(Answer all the questions)
1. Each question below gives a multiple choice of answers. Choose the most
appropriate one and enter in the “tear-off” answer sheet attached to the
question paper, following instructions therein.
(1 x 10)
1.3 For copying files from one place to another, we may use utility
A) tar
B) cpio
C) dd
D) None of the above
1.5 In vi, suppose pressing the character ] takes the cursor to next paragraph. If we give
the command d], the
A) The current paragraph is deleted
B) The character with cursor and up to the end of paragraph is deleted
C) The character following the cursor and up to ] character is deleted
D) None of the above
1.10 To search files which has been accessed in last n days is possible though the utility
(with appropriate options)
A) find
B) ls
C) awk
D) None of the above
2. Each statement below is either TRUE or FALSE. Choose the most appropriate
one and ENTER in the “tear-off” sheet attached to the question paper,
following instructions therein.
(1 x 10)
3. Match words and phrases in column X with the closest related meaning/
word(s)/phrases in column Y. Enter your selection in the “tear-off” answer
sheet attached to the question paper, following instructions therein.
(1 x 10)
X Y
3.1 Execution of the system call A. find
3.2 Frozen image of what process is doing B. FIFO (pipes)
3.3 File type C. User mode
3.4 Storing directory file D. Kernel mode
3.5 Moving cursor to middle line in screen window in vi E. ftp
3.6 The process number of last background command F. Cntl M
3.7 The option of sh causing the shell to echo each G. Binary format
command before its execution with substitution the
shell makes
3.8 A techniques to transfer file from one computer to H. M
another computer on network
3.9 Controls access to a X display I. context
3.10 To find the lines containing specific word in a file J. Text format
K. $!
L. xhost
M. grep
N. -x
O. $$
4. Each statement below has blank space to fit one of the word(s) or phrases in
the list below. Enter your choice in the “tear-off” answer sheet attached to the
question paper, following instructions therein.
(1 x 10)
4.1 The kernel _______ a separate set of processes, which run parallel to user process.
4.2 Number of _______ to the file represents the number of names the file has in the
directory hierarchy.
4.6 A variable can be make the part of environment of current shell and of all processes
(including shell script) descending from it, by using _______ command.
4.8 Applications use the value _______ variable to determine which display, keyboard
and mouse to use.
5.
a) Write sequence of vi commands to exchange top three lines with bottom three lines
of the screen on the vi session.
b) Write a shell script, which asks user to enter the login name. If the name is not in the
“LOGFILE”, display “Sorry! You cannot work.”, otherwise ask for password. The
password in not echoed. Check the password with the “PASSWORD”. If it is not
there display “ACCESS DENIED”.
(7+8)
6.
a) Write a shell script to display login names of all users who have logged off in last 10
minutes.
b) What is the purpose of having /etc/passwd and /etc/shadow files?
c) Write a shell script to print the system time.
(7+4+4)
7.
a) What is motivation for weekly or monthly backup? Explain tar utility with examples.
b) Write the shell script to add a new user in password file /etc/passwd with the
following details:
- group name ‘india’
- log in name ‘guru’
- user name ‘Ramauli of Vindhyachal’
- file system ‘/selected’
(9+6)
8.
a) What is the design principle of X windows? Describe system architecture and
Window manager of X Windows. What is X-toolkits? What does it contain?
b) What is IP address? Explain its construction. Calculate the maximum possible
numbers of class A, class B and class C networks, which can be addressed by IP
scheme.
(9+6)
9.
a) Explain the booting process of Unix system.
b) Describe the data structures associated with processes. How are these affected by
exec, form and exit system calls.
(9+6)