Sunday, 30 October 2016

January, 2013 A8-R4: BASICS OF OS, UNIX AND SHELL PROGRAMMING

January, 2013
A8-R4: BASICS OF OS, UNIX AND SHELL PROGRAMMING

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. (1x10)
1.1 How to switch from text mode to GUI mode in linux?
A) <Ctrl><Tab>F7
B) <Ctrl><Shift>F7
C) <Shift><Tab>F7
D) <Ctrl><Alt>F7
1.2 Which one of the following gives Process ID in UNIX?
A) pid
B) showpid
C) ps
D) none of the above

1.3 How do you see hidden files in your home directory?
A) ls
B) ls -hidden
C) ls -la
D) None of the above
1.4 What command is used with vi editor to delete a single character?
A) x
B) y
C) a
D) z
1.5 What is used to search files for specified words or patterns?
A) less
B) srch
C) %src
D) grep
1.6 What command is used to remove files?
A) erase
B) delete
C) dm
D) rm
1.7 Which command is used to see the online manual?
A) man
B) manual
C) usernamual
D) None of the above
1.8 UNIX system calls are used for
A) Obtain some service from the kernel.
B) Execute a UNIX command from the kernel.
C) Inform administrator about the abnormal condition.
D) None of the above
1.9 Which one of the following is used to change password?
A) passwd
B) chpass
C) changepass
D) passchange
1.10 What command is used to count the total number of lines, words, and characters contained
in a file?
A) countw
B) wcount
C) wc
D) count p

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. (1x10)
2.1 Open Source refers to a program in which the source code is available to the general public
for use and/or modification from its original design free of charge.
2.2 Ctrl + C is used to stop currently executing command.
2.3 Sig command is used to send signal from one process to another process.
2.4 PATH is an editor.
2.5 umask is the number subtracted from the standard permissions when creating a file.
2.6 Linus Torvalds is a principal author of the Linux kernel.
2.7 symbol is used to redirect the output of a command.
2.8 <ctrl>q is used to stop a execution of process.
2.9 fork() system call returns Zero(0) to child process.
2.10 abpath displays absolute path of current directory.

3. Match words and phrases in column X with the closest related meaning/word(s)/phrase(s) in column Y. Enter your selection in the “tear-off” answer sheet attached to the question paper, following instructions therein. (1x10)
                                             X                                                 Y
3.1 Check and repair a Linux file system.                      A. Sticky (bit)
3.2 Environment Variable                                               B. man
3.3 Lists information about the user                               C. ren
3.4 Show who is logged on and what they are doing.     D. fsck
3.5 Display a manual of a command.                               E. mv
3.6 Clear terminal screen                                                F. dir
3.7 A program sticks in memory after execution.          G. finger
3.8 Finds text within a file.                                            H. infouser
3.9 Print the current working directory.                         I. pwd
3.10 Renames a file or moves it from one directory      J. TERM
 to another directory.
                                                                                        K. w
                                                                                         L. grep
                                                                                         M. clear

4. Each statement below has a blank space to fit one of the word(s) or phrase(s) in the list below. Enter your choice in the “tear-off” answer sheet attached to the question paper, following instructions therein. (1x10)

A. read                                     B. Whatis                                           C. at
D. su                                         E. Ctrl+F3                                         F. cd\
G. Alt + F3                               H. Short                                            I. umount
J. etc                                          K. mkfs                                            L. .bash_history
M. userchange

4.1 ________ is used to create Linux file systems.
4.2 Generally, Configuration files are stored at ________.
4.3 ________ command is used in shell to read a line from a terminal.
4.4 The ________ command provides the facility to schedule a job at a specific time.
4.5 ________ is a shortest command to take you to your home directory.
4.6 By pressing ________ repeatedly, Active window is toggled between maximize and
minimize.
4.7 ________ gives short description of command.
4.8 ________ command is used to unmount a filesystem.
4.9 ________ file is stores list of commands which you have entered recently.
4.10 ________ command is used to change user.

PART TWO
(Answer any FOUR questions)
5.
a) Explain grep command, shift command, getopts command of Linux.
b) How to schedule an event or command execution in Linux? Write a command to execute the
"ping" command every minute of every hour of every day of every month. The standard
output should be redirected to /dev/null.
c) What are the file permissions of Linux? How to apply and change permission of any file in
Linux?
(3+6+6)
6.
a) Explain with example, how Linux considers everything as a file. How to mount CD-ROM
drive to Linux OS?
b) X Server runs a graphical interface for the user. How does it work in Linux?
(7+8)
7.
a) Write script to determine whether given file exist or not, file name is supplied as command
line argument, also check for sufficient number of command line argument.
b) What are the steps of Linux Boot Process?
c) htop is an Interactive process view tool in Linux. What type of parameters can be analyzed
by it?
(5+5+5)
8.
a) What are the fields of /etc/passwd and /etc/shadow file?
b) Sed is a stream editor (text transformation). Explain usage of Sed and some basic options of
it.
c) What are various commands available in Linux for taking backups? Explain important
options of each utility.
(6+4+5)
9.
a) List and explain fundamental file types in Linux. How file type can be obtained?
b) UNIX had the concept of IO redirection with standard IN, OUT and ERROR. Explain, at what
time standard IN, OUT and ERROR can be used.
(7+8)

Download PDF

Next Set

No comments:

Post a Comment