A8-R4: BASICS OF OS, UNIX AND SHELL PROGRAMMING
(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?
1.2 Which one of the following gives Process ID in UNIX?
D) none of the above
1.3 How do you see hidden files in your home directory?
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?
1.5 What is used to search files for specified words or patterns?
1.6 What command is used to remove files?
1.7 Which command is used to see the online manual?
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?
1.10 What command is used to count the total number of lines, words, and characters contained
in a file?
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.
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)
D. su E. Ctrl+F3 F. cd\
G. Alt + F3 H. Short I. umount
J. etc K. mkfs L. .bash_history
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
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.
(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
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?
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
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
c) What are various commands available in Linux for taking backups? Explain important
options of each utility.
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.