Pages

Wednesday, 2 November 2016

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

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

1.1 The hidden files in Unix
A) have special status bit associated with the file descriptor
B) have names starting with a dot
C) can be accessed only by the operating system kernel
D) None of the above
1.2 Which one of the following is use of whatis command?
A) It shows short description of command
B) It shows user logged in
C) It shows file type
D) None of the above

1.3 In vi editor, meaning of :1,20w xfile is
A) Save words 1 through 20 to a file called xfile
B) Save lines 1 through 20 to a file called xfile
C) Import lines 1 through 20 to a file called xfile
D) None of the above
1.4 In Unix, file pathname originates from
A) user’s home directory
B) user’s current directory
C) root directory
D) None of the above
1.5 Computer software that is distributed under a licensing arrangement and which allows the
computer code to be shared, viewed and modified by other users and organizations is
known as
A) Reusable
B) Freeware
C) Open Source
D) None of the above

1.6 Which file contains the startup instructions for a user’s account?
A) .startup
B) .login
C) .running_config
D) .start
1.7 In Unix, mounting a file system means
A) Copying all the files from one file system to another
B) Moving all the files from one file system to another
C) Loading a file system from backup medium like tape
D) Providing a link to the file system to be mounted so that it appears as a local subdirectory.
1.8 Which of the following is used to switch from virtual text console to graphical environment?
A) <shift><ctrl>g
B) <ctrl>F1
C) <ctrl><Alt>F7
D) <ctrl>F7
1.9 Which of the following controls the way users can interact through the xwindows?
A) Window manager
B) Login prompt
C) X control
D) None of the above
1.10 Which filter will replace all occurrences of the pattern “old” to “new” in a file?
A) trim
B) sed
C) find
D) replace

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 tr command is used to truncate lines from a file.
2.2 System calls provide the interface between a process and the operating system.
2.3 The wc –c command will give number of words in a file.
2.4 The output of one command can be directly fed into the input of another command using a
“&” operator.
2.5 X Client and X Server software can run on hardware from different vendors.
2.6 The command “cut” splits a file content vertically.
2.7 bg command brings a job from background to foreground.
2.8 /dev directory contains development directories and files.
2.9 nice command alters access permission associated to file or directory.
2.10 User’s name and groupid are stored in /etc/shadow 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 System wide startup script                                A. mv
3.2 Command to change password                        B. ctime
3.3 The command which shows location of         C. ls -la
executable file from PATH environment
3.4 Scheduling a process                                      D. xclipboard
3.5 Format and display the on-line manual page  E. /etc/profile
3.6 Command to rename a file                             F. scm
3.7 Command to test network connectivity          G. cron
3.8 Option of find command to search a file        H. which
 whose metadata has changed
3.9 xWindow with six buttons at top                   I. rename
3.10 A command used to get hidden files           J. ping
                                                                             K. passwd
                                                                             L. man
                                                                             M. /bin/loginscript

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. chown                                        B. /dev                                       C. df
D. DNS                                           E. owner                                    F. chkconfig
G. xinit                                           H. global                                    I. SET
J. PATH                                          K. authentication                      L. Login
M. export

4.1 If a file is SUID, it will run with the privileges of the file’s ________, instead of the privileges
of the person running the program.
4.2 The ________ program is used to start the X Window System server.
4.3 The ________ command gives space usage per file system.
4.4 ________ resolves hostname to IP address.
4.5 ________ command is used to change ownership of file.
4.6 Authorized user with correct password is checked by ________ process.
4.7 ________ command is used for change of service in Linux.
4.8 The device information can be obtained from the ________ directory.
4.9 ________ is an environment variable.
4.10 The scope of a shell variable can be made global to the subshells by the ________
command.

PART TWO
(Answer any FOUR questions)
5.
a) What are the seven fundamental file types of Linux? How to identify file type of any file in
Linux?
b) What are the states of Linux processes?
c) What is background process? Explain with example
(7+6+2)
6.
a) What are the fields of output of “ls –l” command? What is the meaning of each field of the
output?
b) What are differences between hard link and soft link? By taking suitable explain how to
create hard link and soft link.
c) What are the advantages of cpio over tar?
(6+5+4)
7.
a) Write a shell script to find the Maximum, Minimum, Average and Sum of numbers from the
data passed by command line argument. Assume the data.
b) vi is text editor in linux. In which mode of vi, search and replace facility is possible? By taking
suitable example explain various options of search and replace operation in vi editor.
c) What are environment variable in UNIX? Explain any three of them. How do you change
their values?
(5+5+5)
8.
a) What are the device types of Unix Devices? Give example of each.
b) What are the main functions performed by Unix System Administrator?
c) Explain fields of the /etc/passwd file.
(3+4+8)
9.
a) What is the role of window manager in Unix GUI?
b) Write a shell script to calculate the factorial of given number. (Number should be between
1 and 25). Note: Factorial of a number is the product of all positive integers less than or
equal to that number. For example, 5! = 5 x 4 x 3 x 2 x 1 = 120.
c) Explain the following commands:
i) who
ii) pwd

                                           Download PDF


Next Set

No comments:

Post a Comment