You are on page 1of 93

UNIT I

Page 1
Suppose you were assigned a certain terminal and you used to log in from that
terminal. One fine morning you find that you are asked to work from some other
terminal. Does that affect your working enironment!
a. "es
#. No
1.$
% system is considered to #e an on&line system #ecause
a. The system has a network card and it is connected to internet.
#. Deices like key&#oard monitor and standard peripherals are connected to
the system.
c. The system interacts with an application enironment where periodic
measurements are taken and communicated to the system.
1.'
% shell is used #ecause
a. (ach user needs protection from other users.
#. Users need e)clusie enironment to work on a system.
c. To protect OS from inadertent unsafe access to kernel space.
d. Shell holds all the resources in the system.
1.*
Under UNI+ the key #oard is the default input deice and the monitor is the default
output deice.
a. True
#.
1.,
-alse
% UNI+ shell operates as a command interpreter.
a.
True
#. -alse
1..
Uni) OS does not permit customi/ation as it comes with #undled serices.
a. True
#. -alse
1.0
Tools used in the deelopment of UNI+ are different from the tools aaila#le to
users.
a.
True
#. -alse
UNIt II
Page $
% process which has 1ust terminated #ut has yet to relin2uish its resources is called
a. % suspended process
#. % /om#ie process
c. % #locked process
d. % terminated process
'.. Suppose process P is currently suspended. Upon completion of IO3 P 1oins the group
of ready&to&run processes. 4hen the current running process gets suspended3 P would
#e the first process to moe to running state.
a. True
#. -alse
UNIT III
Page '
1. UNI+ uses ls to list files in a directory. The corresponding command in 5S
enironment is6
a. lf
#. listdir
c. dir
$. % file with e)tension .t)t
a. Is a te)t file created using i editor
#. Is a te)t file created using a notepad
c. Is a te)t file created using word
'. In the windows enironment file e)tension identifies the application that created
it. If we remoe the file e)tension can we still open the file!
a. "es
#. No
*. 4hich of the following files in the current directory are identified #y the regular
e)pression a!#7.
a. afile
#. aa#
c. a##
d. a#c
e. a)##
f. a#)y
,. -or some file the access permissions are modified to 0.*. 4hich of the following
interpretation are alid6
a. (ery one can read3 group can e)ecute only and the owner can read and
write.
#. (ery one can read and write3 #ut owner alone can e)ecute.
c. (ery one can read3 group including owner can write3 owner alone can
e)ecute
.. The file8s properties in 4indows enironment include which amongst the
following6
P.9.P.:hat;IISc :angalore
5$;<1;=une >*;1
Operating Systems;-ile Systems and 5anagement
5ultiple 9hoice ?uestions
a. -ile owners8 name
#. -ile si/e
c. The date of last modification
d. Date of file creation
e. The folder where it is located
0. 4hich of the following information is contained in inode structure
a.
The file si/e
#. The name of the owner of the file
c. The access permissions for the file
d. %ll the dates of modification since the file8s creation
e. The num#er of sym#olic links for this file
@. -ile which are linked hae as many inodes as are the links.
a. True
#. -alse
A. 4hich directory under the root contains the information on deices
a. ;usr;#in
#. ;usr;s#in
UNIT III
Page *
c. ;usr;peripherals;de
d. ;etc;de
1 % contiguous allocation is the #est allocation policy. BTrue ; -alseC
$
a. True
#. -alse
' %#solute path names #egin #y identifying path from the root.
a.True
#. -alse
11.1 The command cp can #e used to oerwrite an e)isting file.
a. True
#. -alse
11.$ 4e may repeat m command n times to create n copies of an e)isting file.
a. True
#. -alse
11.' The file names for the linked files can #e different.
a. True
#. -alse
11.* rm command can #e used to remoe a directory file as well.
a. True
#. -alse
11., ls commands always e)poses all the file names starting with B.C
a. True
#. -alse
The file permission 764 means:
a) Every one can read, group can execute only and the owner can read and write
b) Every one can read and write, but owner alone can execute
c) Every one can read, group including owner can write, owner alone can execute
d) Every one can read and write and execute
iew !nswer
"# The permission $rwxr%r% represented in octal expression will be
a) 777
b) 666
c) 744
d) 7&&
iew !nswer
'# Effective user id can be set using following permission
a) (777
b) "666
c) 4744
d) &7&&
iew !nswer
4# Effective group id can be set using following permission
a) (777
b) "666
c) 4744
d) &7&&
iew !nswer
)# *tic+y bit can be set using following permission
a) (777
%n inde)ed allocation policy affords faster information retrieal than the chained
allocation policy.
UNIT III
Page ,
b) "666
c) 4744
d) &7&&
iew !nswer
6# The permission $rw*r%r% represented in octal expression will be
a) (777
b) "666
c) 4744
d) 4644
iew !nswer
7# The permission $rwxr$sr% represented in octal expression will be
a) (777
b) "766
c) "744
d) "7)4
iew !nswer
,# -f user tries to remove .rm) a readonly file .444 permission), what will happen/
a) The file is removed successfully .and silently)
d) The rm command fails because of insufficient permissions
iew !nswer
0# ! user does a chmod operation on a file# 1hich of the following is true/
a) The last accessed time of the file is updated
b) The last modification time of the file is updated
c) The last change time of the file is updated
d) 2one of the above
iew !nswer
&(# -f the umas+ value is ((("# what will be the permissions of new directory
a) 777
b) 77)
c) 774
d) 664
iew !nswer
a) chmod %r 3x 4home4user&4direct
b) chmod %5 3x 4home4user&4direct
c) chmod %f %r 3x 4home4user&4direct
d) chmod %6 3x 4home4user&4direct
iew !nswer
&# The permission $rwxr$xr$t represented in octal expression will be
a) (777
b) &7))
c) &7)4
d) "7)4
iew !nswer
b) The rm command prompts for a confirmation, the command is successful upon
confirmation
c) The rm command prompts for a confirmation, however the operation fails because of
insufficient permissions
&&# 1hat is the command to set the execute permissions to all the files and subdirectories
within the directory 4home4user&4direct
UNIT III
Page .
a) 7x%x$wx
b) $rw$rw$r%
c) $r$xr$x$r%
d) $rw$rw$r%
iew !nswer
'# 1hich command is used to assign read$write permission to the owner/
a) chmod a3r file
b) chmod o3r file
c) chmod u8rw file
d) chmod og$r file
iew !nswer
4# 9iven the command
: chmod o$w datafile
a) sets write permission to everyone for datafile
b) sets write permission to others for datafile
c) clears write permission to everyone for datafile
d) clears write permission to others for datafile
iew !nswer
a) chmod (46 textfile
b) chmod 64( textfile
c) chmod '&( textfile
d) chmod rw r nil textfile
iew !nswer
a# chmod 3x pro;ect&
b# chmod u3x pro;ect&
c# chmod a3x pro;ect&
d# chmod <3= pro;ect&
iew !nswer
7# ! user executes the following command successfully:
: chmod 3x file&#txt
1hich of the following is true of the output of this command/
a) The command results in adding execute permission to the user who ran this command
b) The command results in adding execute permission for the owner of the file
c) The command results in an error since the file is not an executable file
d) The command results in adding execute permission for all users .i#e#, user,group > others)
iew !nswer
,# 1hat does chmod 3t do/
a) wrong syntax
b) set effective userid for filename
c) set effective groupid for filename
d) set the stic+y bit
iew !nswer
"# 1ith a umas+ value of &&", what is the default permission assigned to newly created
regular file/
)# 1hich of these commands will set the permissions on file textfile to read and write for the
owner, read for the group, and nothing for everyone else/
6# -f you are a root user, how can you grand execute permission only for the owner of the file
pro;ect&/
UNIT III
Page 0
a) """
b) &&&
c) (((
d) 444
iew !nswer
a) """
b) &&&
c) (((
d) 2one of the given choices
iew !nswer
&&# The command chmod 4777 a#out
a) will set the suid bit of a#out
b) will set the suid bit of a#out only if the command is issued by root
c) is not a valid command
d) will set the stic+y bit of a#out
iew !nswer
&# ?perating system +ernel must be located in
a) 4
b) 4boot
c) either in 4 or in 4boot
d) none of the mentioned
iew !nswer
"# 1hich one of the following is a mount point for a temporarily mounted filesystem/
a) 4mnt directory
b) 4media directory
c) 4dev directory
d) none of the mentioned
iew !nswer
'# 1hat is 4root/
a) root filesystem
b) home directory of the root user
c) the directory which contains all the directories of the filesystem
d) none of the mentioned
iew !nswer
4# *ystem binaries are stored in
a) 4sbin directory
b) 4usr4sbin directory
c) 4usr4local4sbin directory
d) all of the mentioned
iew !nswer
)# The 4dev directory contains the
a) device drivers
b) device files
c) +ernel modules of device drivers
d) none of the mentioned
iew !nswer
0# 1hich of the following umas+ settings doesn@t allow execute permission to be set by
default on directory files
&(# 1hich of the following umas+ settings allow execute permission to be set by default on
regular files
UNIT III
Page @
6# The contents of root filesystem is responsible to
a) boot the system
b) recover the system
c) repair the system
d) all of the mentioned
iew !nswer
7# *tatic files of the bootloader are installed in
a) 4boot directory
b) 4root directory
c) 4bin directory
d) 4sbin directory
iew !nswer
,# Ainux filesystem contains mainly
a) ordinary files
b) device files
c) directory files
d) all of the mentioned
iew !nswer
0# -n linux filesystem, the passwords of different users are stored in
a) 4etc4passwd file
b) 4bin4passwd file
c) 4etc4shadow file
d) 4bin4shadow file
iew !nswer
&(# *uperuser can change the BBBBBBB permissions of any file#
a) owner
b) group
c) other
d) all of the mentioned
iew !nswer
&# 1hen we install a new pac+age in linux system, then
a) all the files of the pac+ages are installed in a single directory
b) different files are installed at different locations of the file system
c) pac+age wor+s ;ust after extraction, installation is not reCuired
d) none of the mentioned
iew !nswer
"# Dost specific configuration files are installed in
a) 4etc directory
b) 4lib directory
c) 4root directory
d) 4bin directory
iew !nswer
'# The directory 4media is the
a) mount point for removable media
b) mount point for filesystem
c) both .a) and .b)
d) none of the mentioned
iew !nswer
4# 1hat is 4bin4sh /
a) bourne shell
UNIT III
Page A
b) hard or symbolic lin+ to the real shell command
c) bash shell
d) both .b) and .c)
iew !nswer
)# The 4boot directory stores the data that is used
a) before the +ernel begins executing user mode programs
b) after the +ernel begins executing user mode programs
c) before the bootloader is loaded in the 5!E
d) none of the mentioned
iew !nswer
6# 1hich one of the directory does not contain binary files/
a) 4bin
b) 4sbin
c) 4etc
d) none of the mentioned
iew !nswer
7# Fernel modules are present in
a) 4lib directory
b) 4root directory
c) 4boot directory
d) none of the mentioned
iew !nswer
,# The directory 4opt is reserved for
a) installation of add$on application software pac+ages
b) optional booting files
c) optional user specific files
d) none of the mentioned
iew !nswer
0# The directory 4srv contains
a) site$specific data which is served by the system
b) all the system files
c) all the service files provided by the specific user
d) none of the mentioned
iew !nswer
a) 4var
b) 4tmp
c) 4etc
d) all of the mentioned
iew !nswer
&# 1hich one of the following is not true about proc filesystem/
a) proc filesystem is a pseudo$filesystem
b) proc filesystem is used as an interface to +ernel data structures
c) some files in proc filesystem allow +ernel variables to be changed
d) none of the mentioned
iew !nswer
"# Groc filesystem provides the information about
a) processes
b) processor
&(# !ny file or directory present in the BBBBBB directory may not be reserved between the
invocation of the program#
UNIT III
Page 1>
c) proxy server
d) none of the mentioned
iew !nswer
'# The 4proc directory contains
a) numerical sub$directory for each running process
b) sub$directories for installed buses
c) a text listing of filesystems which are supported by the +ernel
d) all of the mentioned
iew !nswer
4# The file 4proc4HG-IJ4cgroups
a) describes control groups to which the process belongs
b) contains the information about all groups of the system
c) provides the information about the group which has generated the process
d) none of the mentioned
iew !nswer
a) child process
b) Kombie process
c) orphan process
d) none of the mentioned
iew !nswer
6# 1hat is 4proc4HG-IJ4cwd/
a) symbolic lin+ to current directory of the process
b) regular file containing the information about the current status of the process
c) directory containing various sub$directories
d) none of the mentioned
iew !nswer
7# 1hich one of the following file contains the environment for the process/
a) 4proc4HG-IJ4environ
b) 4proc4HG-IJ4env
c) 4proc4HG-IJ4path
d) none of the mentioned
iew !nswer
,# The entry for each file opened by the process is present in
a) 4proc4HG-IJ4fd
b) 4proc4HG-IJ4file
c) 4proc4HG-IJ4maps
d) none of the mentioned
iew !nswer
0# The file 4proc4HG-IJ4limits displays the BBBBBB for each of the process@s resource limits#
a) hard limit
b) soft limit
c) units of measurement
d) all of the mentioned
iew !nswer
&(# The file 4proc4HG-IJ4maps contains the
a) currently mapped memory regions
b) available memory regions
c) memory regions which are free to map
)# The file 4proc4HG-IJ4cmdline holds the complete command line for the process, unless the
process is a
UNIT III
Page 11
d) none of the mentioned
iew !nswer
1hich command is used to chec+ filesystem usage in a system/
a) mount
b) df
c) du
d) dd
iew !nswer
"# 1hich among the following allows fast file system recovery/
a) Ext"
b) Lournaling
c) Maching
d) *ysfs
iew !nswer
a) Ext'
b) *ysfs
c) Ext4
d) Grocfs
iew !nswer
4# 6ilesystem for MI5?E is:
a) Ext"
b) Ext'
c) -sofs
d) Grocfs
iew !nswer
)# 1hich file system has ;ournaling capability/
a) Ext"
b) Ext4
c) -sofs
d) Grocfs
iew !nswer
6# 1hich file contains the filesystems to be automatically mounted during boot/
a) 4etc4mount
b) 4etc4fstab
c) 4etc4inittab
d) 4etc4boot
iew !nswer
7# BBBB is a directory .which should exist), on which to mount the file system/
a) 5oot
b) Noot
c) Eount$point
d) Gartition
iew !nswer
,# 1hich command is used to mount file system read only#
a) mount %a
b) mount %v
c) mount %f
d) mount %r
'# 1hich filesystem can be used to change certain +ernel parameters at runtime using sysctl
command/
UNIT III
Page 1$
iew !nswer
&# The soft lin+ will increase the lin+ counter of the file#.T46)
a) True
b) 6alse
iew !nswer
"# 1hen you use the ln command, which of the following occurs/
a) a file is created that points to an existing file
b) a file is created that is a copy of an existing file
c) a file is moved from one location to another
d) a file is renamed
iew !nswer
'# srwxr$xrw$ is a
a) internet soc+et file
b) unix domain soc+et file
c) symbolic lin+
d) shared file
iew !nswer
4# Ninary or executable files are:
a) 5egular files
b) Ievice files
c) *pecial files
d) Iirectory files
iew !nswer
)# The directory file contains:
a) 6ile names > 6ile *iKes
b) 6ile names > -node 2umbers
c) 6ile names > !ddress
d) 6ile names > Germissions
iew !nswer
6# 1hich directory contain device special files/
a 4etc
b) 4etc4dev
c) 4root4bin
d) 4dev
iew !nswer
7# 1hich of the following is not a valid file type on Ainux
a) *oc+et
b) *oftlin+
c) -node
d) 6-6?
iew !nswer
,# 1hich of the following is not correct statement regarding file types/
a) Dard lin+s share same inode number
b) *oft lin+s cannot be created across partitions
c) *oc+et files are <nix domain soc+ets
d) Mharacter file is a special file
iew !nswer
0# 1hich are the two types of device files/
a) Mharacter > Nloc+
b) Mharacter > *oc+et
UNIT III
Page 1'
c) Nloc+ > 6-6?
d) -nput > output
iew !nswer
&(# 1hich is an example for character special file/
a) Dard dis+
b) MI$5?E
c) Terminal
d) Eemory
iew !nswer
&&# 1hich is an example for bloc+ special file/
a) irtual Terminal
b) MI$5?E
c) Terminal
d) *erial modem
iew !nswer
&"# !ll device files are stored in which directory/
a) 4etc
b) 4bin
c) 4dev
d) 4usr
iew !nswer
&# The ma;or number identifies the BBBBB associated with the device#
a) driver
b) protocol
c) port
d) none of the mentioned
iew !nswer
"# The minor number range should be
a) ( to &)
b) ( to 6'
c) ( to "))
d) none of the mentioned
iew !nswer
'# 1hich one of the following is not true/
a) dynamic allocation of ma;or numbers is not possible
b) ma;or number can not be shared among drivers
c) both .a) and .b)
d) none of the mentioned
iew !nswer
4# -n linux +ernel "#4, we can have
a) ")6 character drivers only
b) ")6 bloc+ drivers only
c) ")6 character drivers and ")6 bloc+ drivers at the same time
d) none of the mentioned
iew !nswer
)# -n we use a driver for 2 number of files, then we have to create BBBB device files#
a) 2
b) &
c) 2$&
d) none of the mentioned
UNIT III
Page 1*
iew !nswer
6# -f we use a driver for various device files, then
a) minor number will be different for every device file
b) minor number will be same for every device file
c) minor number can not be allocated for any device file
d) none of the mentioned
iew !nswer
7# The connection between the device file and device driver is based on the
a) name of device file
b) number of device file
c) both .a) and .b)
d) none of the mentioned
iew !nswer
,# -n linux +ernel "#&, the minor numbers were used to
a) represnt the sub$functionalitites of the driver
b) identify the driver
c) represent the device files
d) none of the mentioned
iew !nswer
0# The +ernel identifies the driver with its
a) module
b) ma;or number
c) device file
d) none of the mentioned
iew !nswer
&(# -n linux, a device driver can wor+ without the
a) ma;or number
b) minor number
c) device file name
d) none of the mentioned
iew !nswer
UNIT I<
Page 1,
&# 1hich of the following is not a valid run$level
a) *
b) (
c) ,
d) &
?n Ainux, initrd is a file
d) 2one of the above
a) Fernel
b) *hell
c) Mommands
d) *cript
The process of starting up a computer is +nown as
a) Noot Aoading
b) Noot 5ecord
c) Noot *trapping
d) Nooting
Nootstrapping is also +nown as
a) Ouic+ boot
b) Mold boot
c) Dot boot
d) 6ast boot
The shell used for *ingle user mode shell is:
a) bash
b) Msh
c) +sh
d) sh
*ingle user mode shell runs as
a) !dmin user
b) 5oot user
c) normal user
d) Aog user
a) boot
b) usr
c) root
d) tmp
a) *ched daemon
b) *wap daemon
a) containing root file$system reCuired during
bootup
b) Montains only scripts to be executed during
bootup
c) Montains root$file system and drivers reCuired to
be preloaded during bootup
1hich is loaded into memory when system is
booted/
1hich is the only partition mounted in *ingle user
mode
1hich daemon manages the physical memory by
moving process from physical memory to swap
space when more physical memory is needed#
UNIT I<
Page 1.
c) -nit daemon
d) Grocess daemon
a) 4etc4init
b) 4etc4sched
c) 4etc4swap
d) 4etc4+ernel
The process id of init process is:
a) $&
b) (
c) &
d) "
1hich file is read by init to get the default runlevel
a) 4etc4profile
b) 4etc4init
c) 4etc4boot
d) 4etc4inittab
A.
B.
C.
D.
A.
B.
C.
D.
2
A.
B.
C.
!t the end of +ernel bootstrap, which process is
started/


UNIT I<
Page 10
D.
3
A.
B.
C.
D.
4
A.
B.
C.
D.
5
A.
B.
C.
UNIT I<
Page 1@
D.
6
A.
B.
C.
D.
7
A.
B.
C.
D.
8
A.
B.
C.
D.
9
UNIT I<
Page 1A
A.
B.
C.
D.
10
A.
B.
C.
D.
11
A.
B.
C.
D.
12
A.
B.
C.
D.
13
UNIT I<
Page $>
A.
B.
C.
D.
14
A.
B.
C.
D.
15
A.
B.
C.
D.
16
A.
B.
C.
D.
17
A.
B.
C.
UNIT I<
Page $1
D.
18
A.
B.
C.
D.
19
A.
B.
C.
D.
20
A.
B.
C.
D.
UNIT I<
Page $$
21
A.
B.
C.
D.
22
A.
B.
C.
D.
23
A.
B.
C.
D.
24
A.
B.
C.
D.
UNIT I<
Page $'
25
A.
B.
C.
D.
26
A.
B.
C.
D.
27
A.
B.
C.
D.
28
A.
B.
C.
D.
UNIT I<
Page $*
29
A.
B.
C.
D.
30
A.
B.
C.
D.
31
A.
B.
C.
D.
32
A.
B.
UNIT I<
Page $,
C.
D.
33
A.
B.
C.
D.
34
A.
B.
C.
D.
35
A.
B.
C.
UNIT I<
Page $.
D.
36
A.
B.
C.
D.
37
A.
B.
C.
D.
38
A.
B.
C.
D.
39
A.
B.
C.
D.
40
A.
B.
C.
D.
UNIT I<
Page $0
41
A.
B.
C.
D.
42
A.
B.
C.
D.
43
A.
B.
C.
D.
44
A.
B.
C.
D.
45
A.
B.
C.
D.
UNIT I<
Page $@
46
A.
B.
C.
D.
47
A.
B.
C.
D.
48
A.
B.
C.
D.
49
A.
B.
C.
D.
50
A.
B.
C.
D.
UNIT I<
Page $A
51
A.
B.
C.
D.
52
A.
B.
C.
D.
53
A.
B.
C.
D.
UNIT I<
Page '>
UNIT I<
Page '1
UNIT I<
Page '$
UNIT I<
Page ''
UNIT I<
Page '*
UNIT I<
Page ',
UNIT I<
Page '.
UNIT I<
Page '0
UNIT I<
Page '@
UNIT I<
Page 'A
UNIT I<
Page *>
UNIT I<
Page *1
UNIT I<
Page *$
UNIT I<
Page *'
UNIT I<
Page **
UNIT I<
Page *,
UNIT I<
Page *.
UNIT I<
Page *0
UNIT I<
Page *@
1hat is the full path for grubPs configuration file
4boot4grub4lsof#conf
4boot4grub4menu#lst
4etc4grub4grub#conf
4etc4grub4grub#txt
Dow do you see hidden files in your home directory/
ls $h
ls $la
ls $hn
ls $5
Dow do you create a crontab entry/
crontab $c
crontab $e
crontab $ma+e
UNIT I<
Page *A
crontab $$create
1hat is the full path for grubPs configuration file
4boot4grub4lsof#conf
4boot4grub4menu#lst
4etc4grub4grub#conf
4etc4grub4grub#txt
Dow do you create a crontab entry/
crontab $$create
crontab $ma+e
crontab $e
crontab $c
*end commandPs standard output to file&,and its standard error to file"
*end commandPs standard error to file&, and its standard output to file"
*end commandPs standard error to file&, and its standard input to file"
1hat is the following syntax used for/ command Qfile& "Qfile"
UNIT I<
Page ,>
*end commandPs standard input to file&,and its standard output to file"
1hat +eyboard combination can be used to exit the shell/
Mtrl3E
Mtrl3M
Mtrl3I
Mtrl3R
Dow would you show process hierarchy in forest format/
ps $ef $tree
ps $ef $$f
ps $ef $$forest
ps $ef $t
cp $r Gro;ect Gro;ect#bac+up
cp $e Gro;ect Gro;ect#bac+up
cp $d Gro;ect Gro;ect#bac+up
cp $s Gro;ect Gro;ect#bac+up
Dow do you direct the shell to execute a command in the bac+ground/
Dow do you copy an entire directory structure/ E#g# from Gro;ect to
Gro;ect#bac+up
UNIT I<
Page ,1
Gut an > symbol at the end of the command line#
Fey in fg followed by the command name#
Gress Mtrl3c after you have +eyed in the command#
Gress Mtrl3d after you have +eyed in the command#
5unlevel "
5unlevel '
5unlevel (
5unlevel &
Dow would you display running httpd processes/
ps $M httpd
ps $d httpd
ps $r httpd
ps $I httpd
4dev4stdin
4dev4stdout
4dev4stderr
4dev4hdal
1hich file determines what will be run at each runlevel/
1hich runlevel allows full multiuser mode but with no graphical login
manager/
*ome commands, including cat, interpret a minus sign .$) as a shortcut
for###
UNIT I<
Page ,$
4etc4init4runlevels
4etc4levels4fstab
4etc4fstab
4etc4inittab
Dow would you avoid accidentally removing files/
rm $i
rm $ch+
rm $a
rm $r
Dow would you continuously display memory usage every ) seconds/
free $s )
top $m )
du $m )
mem $c )
1hich of the following cannot be used as a mount option in 4etc4fstab/
rw
noexec
ndev
defaults
-n which directory are the crontab files for users stored on suse linux/
4var4spool4cron4tabs
4usr4lib4cron
4usr4bin4cron4crontabs
UNIT I<
Page ,'
4var4spool4cron4users4tabs
Dow would you turn on the stic+y bit on the directory 4tmp/
chmod u3s 4tmp
chmod 3st 4tmp
chmod a3s 4tmp
chmod o3t 4temp
Dow do you see if two files are hard lin+ed to each other/
hl $l
ln $s
ls $i
lin+ $s
1hat is the following syntax used forcommand "Q 4dev4null
*end the output of command to a file called 4dev4null
Iiscard standard error entirely#
!ppend the output of command to a file called 4dev4null
*end error messages from command to a file called 4dev4null
UNIT I<
Page ,*
1hat symbol is used to show that !MAs have been set on a file/
(
S
Q
load initial ramdis+
run init
mount root filesystem
load modules
Dow would you list oldest files first and newest ones last/
ls 4o$d
ls $od
ls $rt
ls $dt
raf4email4save
4email4save
4home4raf4email4save
email4save
Iuring the linux boot process, what happens immediately after the phase
called Tload +ernelT/
*uppose you are in your home directory, 4home4raf as in diagram above#
1hat is the relative path for the file called TsaveT in the Email
subdirectory/
UNIT I<
Page ,,
grep PclothesUP shopping
grep PclothesVP shopping
grep Pclothes:P shopping
grep PclothesWP shopping
1hich file is the list of commands you recently entered stored in/
#bashrcBhistory
#history
#bashBhistory
#bashBlistBhistory
Dow would you find out what your current login shell is/
cat 4etc4shell
cat 4etc4current4shell
ps X grep sshd
echo ::*DEAA
1hich signal number corresponds with the *-9*T?G signal/
&
&0
0
&,
Dow would you search for the string clothes at the end of the line in a file
called shopping/
UNIT I<
Page ,.
The following can be used to set the immutable attribute on a file/
chattr 3i
attrib 3i
imod 3a
chmod 3i
echo :<-I
id
cat 4etc4passwd
cat 4etc4groups
#bashtr
#linuxBterm
#termBwin
#bashrc
*end standard error to a file called >&
!ppend standard error to a file called >&
Dow do you find out information about your identity, including the names
of the groups you are in/
You want to display a message when you open a new terminal window#
1hich file do you edit/
1hat does the "Q>& at the end of the following command mean/find 4
$name fred#txt Q names "Q>&
UNIT I<
Page ,0
*end standard error to the same place as standard output
*end the output of the find command to 4dev4null
-t is used to send both input and output to the same file#
-t is used to overwrite the contents of a file#
-t appends data to a file without overwriting it#
Dow would you loc+ the user account named csm(00/
usermod $l csm(00
usermod $A csm(00
usermod $$l csm(00
usermod $loc+ csm(00
Dow would you switch to virtual terminal &/
Mtrl3!lt36&
!lt36&
Mtrl36&
1hat is the purpose of the following operator/ QQ
-t is used to send the output of one command so it becomes the input of a
second command#
UNIT I<
Page ,@
*hift3Mtrl36&
1hich command can be used to edit and then run command no# 4(/
fc 4(
hs 4(
rc 4(
er 4(
4bin4cpu
4dev4cpuinfo
4etc4cpu
4proc4cpuinfo
Dow do you delete your crontab entry/
crontab $d
crontab $e
crontab $r
del $crontab
To run date first, and then ls $l, which of the following is correct/
date : ls $l
date Z ls $l
date $ ls $l
date Q ls $l
5unlevel &
5unlevel "
5unlevel '
5unlevel (
To display information about the processor itself $ display the contents of
which file/
1hich runlevel allows full multiuser mode but with no graphical login
manager/
UNIT I<
Page ,A
1hich file is the list of commands you recently entered stored in/
#bashBlist
#bashBhistory
#history
#bashrc
chmod 3i
immut 3a
attrib 3i
chattr 3i
1hich command displays the settings for all services at all runlevels/
runlevel $$settings
status $$l
services $$runlevels
ch+config $$list
1hich command is used to unmount a filesystem/
dmount
dismount
unmount
umount
Dow do you display your current crontab entry/
crontab $display
crontab $d
list $$crontab
crontab $l
1hich of the following can be used to set the immutable attribute on a
file/
UNIT I<
Page .>
hup#out command
hup command
;obc command
nohup command
1hich of the following runs the last command you entered/
SV
VS
VV
##
1hat is the shortest command to ta+e you to your home directory/
cd S
cd :D?EE
cd
(
service $$status$all
ps $list $$daemons
daemons $$list $$all
cron $$status
Dow would you remove a directory that is not empty/
rm $r
rm $f
rmdir $f
rmdir $le
Dow do you run a ;ob that will continue running even if you are logged
out/
1hich of the following could you use to chec+ if the cron daemon is
running/
UNIT I<
Page .1
1hat does the permission string nvxr$xr$$ correspond with in octal/
7)4
7"4
6"4
74"
Dow do you display the +ernel release/
+ernel $r
uname $r
cat 4proc4etc4+ernel4release
cat 4etc4config4+ernel4release
Dow would you sort a file called shopping on column '/
sort $n ' shopping
sort $+ ' shopping
sort $c ' shopping
sort $c' shopping
1hich file contains the boot options passed to the +ernel/
a) 4proc4cmdline
b) 4proc4root
c) 4proc4boot
d) none of the mentioned
4proc4tty contains the information about
a) current terminal
b) all terminals
c) both .a) and .b)
d) none of the mentioned
1hat will be output of following command:
$ echo "The process id is" $$$$
a) The process id is $$
b) The process id is $<pid>$<pid>
c) The process id is <pid><pid>
d) The process id is $$$$ View Answer

UNIT I<
Page .$
$ pwd
/home/user1/proj
$ cd src
$ cd generic
$ cd .
$ pwd
a) /home/user1/proj
b) /home/user1/proj/src
c) /home/user1
d) /home/user1/proj/src/generic
View Answer
a) cat i!ename " head " tai! #$
b) cat i!ename " head " tai! #%
c) cat i!ename " tai! &% " head
d) cat i!ename " tai! #% " head #1'
View Answer
a) cp i!e.t(t i!e).t(t new.t(t
b) cat i!e1.t(t i!e).t(t > new.t(t
c) m* i!e+1),.t(t new.t(t
d) !s i!e1.t(t i!e).t(t " new.t(t
View Answer
%. which o these is -.T a *a!id *ariab!e in bash
a) // 0doub!e underscore)
b) /1*ar 0underscore 1 *ar )
c) /*ar/ 0underscore *ar underscore)
d) some#*ar 0some h1phen *ar)
View Answer
$. 2hat is the output o the o!!owing code3
os45ni(
echo 1.$os )."$os" 6.7$os7 8.$os
a) 1.5ni( ).5ni( 6.5ni( 8.5ni(
b) 1.5ni( ).5ni( 6.$os 8.5ni(
c) 1.5ni( ).5ni( 6.5ni( 8.$os
d) 1.5ni( ).$os 6.$os 8.$os View Answer
9. 2hat is the return *a!ue 0$:) o this code3
os 4 5ni(
+$os-ame 4 5ni(-ame, ;; e(it )
+$<os=-ame 4 5ni(-ame, ;; e(it 6
a) '
b) 1
c) )
). 2hat wou!d be the current wor>ing director1 at
the end o the o!!owing command se?uence:
6. @ow do 1ou print the !ines between % and 1'A
both inc!usi*e
8. Breate a new i!e Cnew.t(tD that is a
concatenation o Ci!e1.t(tD and Ci!e).t(tD

UNIT I<
Page .'
d) 6 View Answer
E. 2hat is the output o the o!!owing program:
( 4 6F 1 4 %F G 4 1'F
i +0 $( #e? 6 ) #a 0 $1 #e? % #o $G #e? 1' ),
then
echo $(
e!se
echo $1
i
a) 1
b) 6
c) %
d) Hrror
View Answer
I. 2hat is the output o the o!!owing program:
+ #n $@.JH ,
echo $:
+ #G $@.JH ,
echo $:
a) '
1
b) 1
'
c) '
'
d) 1
1 View Answer
1'. 2hat is the output o the o!!owing program:
b 4
+ #n $b ,
echo $:
+ #G $b ,
echo $:
a) 1
1
b) )
)
c) '
'
d) '
1 View Answer
11. The e(pression e(pr #I K ) e*a!uates to3
a) '
b) 1
c) #1
d) )
View Answer
a) '
1). The statement G 4 Le(pr % / )M wou!d store
which o the o!!owing *a!ues in G:
UNIT I<
Page .*
b) 1
c) )
d) ).%
e) 6
View Answer
a) -? redirection can be used
b) 2amed pipes can be used
c) The pipe operator provided by the shell can be used
d) -t can not be done
iew !nswer
a) env
b) export
c) environ
d) setenviron
iew !nswer
'# 1hile executing a command, the shell
a) Executes it in the same process .as shell)
b) Mreates a child shell to execute it
c) Aoads a special program to ta+e care of the execution
d) 2one of the above
iew !nswer
4# 1hich variable contains current shell process id
a) :[
b) :/
c) ::
d) :V
iew !nswer
)# 1hich command is used to debug a shell script program
a) set
b) set $x
c) debug
d) db
iew !nswer
6# 6or every successful login, which script will be executed/
a) 4etc4inittab
b) 4etc4profile
c) 4etc4login
d) 4etc4init
iew !nswer
7# Didden files are
a) Those whose \read@ bit is set to \h@
b) Germitted for .can be accessed) only superusers
c) 6iles that begin with a \#@
d) 6iles that cannot be opened by ordinary user for writing
iew !nswer
,# *hell is /
&# To feed standard output of one command to standard input of another in
a single shell session
"# 1hich of the following commands allows definition and assignment of
environment variables under bash
UNIT I<
Page .,
a) Mommand -nterpreter
b) -nterface between Fernel and Dardware
c) -nterface between user and applications
d) Mommand Mompiler
iew !nswer
a) The file is passed to 4bin4sh
b) The system returns an error
c) The current shell will try to execute it
d) 2one of the mentioned
iew !nswer
"# 1hich of the following is true/
a) *hell is a process and can be started by superuser only
b) *hell is a built$in Fernel functionality
c) *hell is a wrapper for all the commands and utilities
d) 2one of the mentioned
iew !nswer
'# 1hich is true with regards to the shell prompt
a) -t can be accidentally erased with bac+space
b) The prompt cannot be modified
c) The prompt can be customiKed .modified)
d) 2one of the mentioned
iew !nswer
4# 1hat is a shell in <2-=/
a) a program through which users can issue commands to <2-=
b) a window management system
c) the login screen
d) the thing that rides on the bac+ of a turtle in <2-=
iew !nswer
)# 1hich of the following represents an absolute path/
a) ##4home4file#txt
b) bin4cat
c) cs""(44
d) 4usr4bin4cat
iew !nswer
: cd pro;ect4module&
: pwd
a) 4home4bho;as4pro;ect4module&
b) 4home4pro;ect4module&
c) 4usr4bho;as4pro;ect4module&
d) pro;ect4module&
iew !nswer
7# N!*D shell stands for/
a) Nourne$again *hell
b) Nasic !ccess *hell
c) Nasic to !dvanced *hell
d) Nig > !dvanced *hell
-f a file with execute permissions set, but with un+nown file format is
executed
6# The user bho;as logged in and performed the following seCuence of
command# 1hat will be the output of the last command/
UNIT I<
Page ..
iew !nswer
a) reminder
b) receipt
c) 5eceipt
d) recipe$ca+e
iew !nswer
# The redirection "Q abc implies
a) 1rite file " to file abc
b) 1rite standard output to abc
c) 1rite standard error to abc
d) none of the mentioned
iew !nswer
"# cmd "Q>& Q abc will
a) 1rite file" to file&
b) 1rite standard output and standard error to abc
c) 1rite standard error to abc
d) 1rite standard output to abc > standard error to monitor
iew !nswer
'# cmd Q abc "Q>& will
a) 1rite file" to file&
b) 1rite standard output and standard error to abc
c) 1rite standard error to abc
d) 1rite standard output to abc > standard error to monitor
iew !nswer
a) echo foo Q 4tmp4bar
b) echo foo QQ 4tmp4bar
c) echo foo X 4tmp4var
d) 4tmp4bar ] echo foo
iew !nswer
)# *yntax to suppress the display of command error to monitor/
a) command Q >"
b) command "Q >&
c) command "Q >"
d) command "Q 4dev4null
iew !nswer
6# The following commands gives the output li+e this
Ucat file& file"
Ucat: file&: 2o such file or directory
hello
a) cat: file&: 2o such file or directory hello
b) 2o output is displayed
c) Mat: &Q": 2o such file or directory
d) hello
iew !nswer
7# cat ] file& QQ file" X file'
a) file& content will be appended to file" and finally stored in file'
b) file& content will be appended to file" and file' will be ignored
c) file" and file' will have same content
,# 1hich of the following files will not be displayed by the command cat
re[ /
file/
be
UNIT I<
Page .0
d) syntax error
iew !nswer
,# Executing cat 4etc4password Q 4dev4sda as superuser will
a) 1rite data into a regular file called 4dev4sda
b) 1rite data to the physical device sda
c) Mreate a temporary file 4dev4sda and write data to it
d) 2one of the above
iew !nswer
exec ] file&
exec ] file"
exec ] file'
read line
a) -t would read all the files
b) -t would not read any files
c) -t would read all the files in reverse order
d) -t would read only file'
iew !nswer
&# The : variables in a shell script context designates
a) The runtime of the script
b) 2umber of command line arguments
c) G-I of the shell running the script
d) The exit status of the shell script
iew !nswer
a) :(
b) :U
c) :[
d) :/
iew !nswer
'# 1hich variable contains last bac+ground ;ob process id
a) :[
b) :/
c) ::
d) :V
iew !nswer
4# 1hich command can be used to test various file attributes
a) if
b) file
c) test
d) type
iew !nswer
)# [ *pecifies
a) one or more character
b) Kero or more charecter
c) nothing
d) 2one of the above
iew !nswer
6# / *pecifies
a) one or more character
were executed/
"# 1hich variable is used to display number of arguments specified in
command line
UNIT I<
Page .@
b) Kero or more charecter
c) one character
d) 2one of the above
iew !nswer
a) afcc, aabb
b) aabb, axbc
c) abbb, abxy
d) abcd, axbb
iew !nswer
,# 1hat command would send the output of cmd& to the input of cmd"/
a) cmd& X cmd"
b) cmd& XX cmd"
c) cmd& >> cmd"
d) cmd& Z cmd"
e) cmd& cmd"
iew !nswer
0# 1hat is the output of the following command for bash shell:
echo linux :(
a) linux echo
b) linux linux
c) linux bash
d) linux
iew !nswer
&(# 1hich variable will display the list of the positional parameters/
a) :U
b) :[
c) :/
d) ::
iew !nswer
1hich option of grep displays the line number as well/
a) $v
b) $l
c) $n
d) $E
iew !nswer
"# Dow can you search for blan+ line in a file/
a) : grep ^ ^ file
b) : grep ^W:_ file
c) : grep H^ ^J file
d) : grep HW:J file
iew !nswer
a) file!, fileN and file!NM
b) file!NM
c) file! and fileN
d) file!N, fileNM and file!NM
7# 1hich of the following file set in the current directory are identified by
the regular expression a/b[
'# !ssuming the files file!, fileN, file!N, fileNM and file!NM, exist in a
directory, which files match with the pattern fileH!NMJ/
UNIT I<
Page .A
iew !nswer
4# 1hat will be printed for the command below/
: grep %c ^Wecho_ abc
a) The count of lines that do not contain the pattern echo in file abc
b) The count of lines which begin with the pattern echo in file abc
c) The count of lines that ends with the pattern echo in file abc
d) 2one of the above
iew !nswer
)# 1hich one is used to select only one copy of the repeated lines/
a) uniC $u
b) uniC $d
c) uniC $c
d) uniC %-
iew !nswer
6# -ndicate the right option to search for N?N, Nob, N?b or NoN/
a) grep %i Nob files
b) grep \NHo?JHbNJ\ files
c) grep \HN?NJ\ files
d) grep $v \Nob@ files
iew !nswer
7# -ndicate the right option to search for anything not a letter or number
a) grep \WHa$K!$R($0J@
b) grep \HWa$K!$R($0J@
c) grep \Ha$K!$R($0J@
d) 2one of the above
iew !nswer
,# Dow do you remove duplicate lines from the file foo using uniC/
a) sort foo X uniC %u
b) sort $u foo X uniC $d
c) sort foo X uniC %c
d) sort foo X uniC %-
iew !nswer
0# ?ne of the entry of 4etc4passwd file is shown below:
user&:x:&&&&:"""":*anfoundry:4home4user&:4bin4bash
a) aw+ `aprint :& ^:_ :6b` 4etc4passwd
b) aw+ `aprint :& ^:_ :7b` 4etc4passwd
c) aw+ `aprint :" ^:_ :6b` 4etc4passwd
d) aw+ `aprint :" ^:_ :7b` 4etc4passwd
iew !nswer
&(# who X cut %d _ _ $f&
what is the ouput if the who command displays li+e this
user& tty ( &"'4
a) user&
b) user& tty ( &"'4
c) tty
d) tty ( &"'4
iew !nswer
1hich among the following will print userid and home dir in the following
pattern ^user&:4home4user&_
UNIT I<
Page 0>
a) printline
b) cmp
c) com
d) comm
iew !nswer
a) HJ
b) W
c) #
d)
iew !nswer
a) nothing
b) exit status of the last command executed
c) (
d) none of the mentioned
iew !nswer
"# Garameters can be passed to a function
a) by using the parameter variables :&, :", :'cc#
b) by using the environment variables
c) both .a) and .b)
d) none of the mentioned
iew !nswer
a) declare $f
b) declare $6
c) both .a) and .b)
d) none of the mentioned
iew !nswer
4# The +eyword \local@ is used
a) to define a variable within a function for its local scope
b) to redefine any global variable
c) this is not a valid +eyword
d) none of the mentioned
iew !nswer
)# 6unctions improves the shell@s programmability significantly, because
b) function provides a piece of code for repetative tas+s
c) both .a) and .b)
d) none of the mentioned
iew !nswer
6# 1hat is the output of this program/
NO/bin/sh
&&# 1hat is the command that can print lines of first file matching with
second file/
&"# 1hich character to use to escape meaning of special characters in
search operations/
&# 1hen the return value of any function is not specified within the
function, what function returns/
'# 1hich of the following command provides the list of the functions
defined in the login session/
a) when we invo+e a function, it is already in the shell@s memory, therefore
a function runs faster than seperate scripts
UNIT I<
Page 01
*ar4"Panoundr1"
san/unction0) <
*ar4"Qinu("
echo $*ar
=
san/unction
e(it '
a) Panoundr1
b) Qinu(
c) command not ound
d) none o the mentioned
View Answer
9. 2hat is the output o this program:
NO/bin/sh
san/unction0) <
echo "2e!come to the Panoundr1"
print "2or!d o Qinu(Rn"
=
unset # san/unction
san/unction
e(it '
a) 2e!come to the Panoundr1
b) 2or!d o Qinu(
c) both 0a) and 0b)
d) nothing wi!! print
View Answer
E. 2hat is the output o this program:
NO/bin/bash
unction san/unction1 <
echo "This is irst unction"
=
san/unction)0) <
echo "This is second unction"
=
san/unction1
san/unction)
e(it '
a) This is the irst unction
b) This is the second unction
c) This is the irst unction
This is the second unction
View Answer
I. 2hat is the output o this program:
NO/bin/sh
echo "Sust ca!! the unction"
san/unction
san/unction0) <
echo "This is a unction"
d) program wi!! generate error because irst
unction deinition is not correct
UNIT I<
Page 0$
=
e(it '
a) on!1 irst string wi!! print without an1 error
b) on!1 second string wi!! print without an1 error
c) both strings wi!! print
d) none o the mentioned
View Answer
1'. 2hat is the output o this program:
NO/bin/sh
san/unction10) <
a4%
echo "This is the irst unction"
san/unction)
=
san/unction)0) <
echo "This is the second unction"
san/unction6
=
san/unction60) <
echo "This is the third unction"
=
san/unction1
e(it '
a) This is the irst unction
This is the second unction
This is the third unction
b) This is the irst unction
This is the third unction
This is the second unction
c) This is the second unction
This is the irst unction
This is the third unction
d) This is the third unction
This is the irst unction
This is the second unction
View Answer
&# The dmesg command
a) *hows user login logoff attempts
b) *hows the syslog file for info messages
c) +ernel log messages
d) *hows the daemon log messages
iew !nswer
"# The command ^m+nod myfifo b 4 &6_
a) 1ill create a bloc+ device if user is root
b) 1ill create a bloc+ device for all users
c) 1ill create a 6-6? if user is not root
d) 2one of the above
iew !nswer
UNIT I<
Page 0'
'# 1hich command is used to set terminal -? characteristic/
a) tty
b) ctty
c) ptty
d) stty
iew !nswer
4# 1hich command is used to record a user login session in a file
a) macro
b) read
c) script
d) none of the above
iew !nswer
)# 1hich command is used to display the operating system name
a) os
b) <nix
c) +ernel
d) uname
iew !nswer
6# 1hich command is used to display the unix version
a) uname $r
b) uname $n
c) uname $t
d) +ernel
iew !nswer
7# 1hich command is used to print a file
a) print
b) ptr
c) lpr
d) none of the above
iew !nswer
,# <sing which command you find resource limits to the session/
a) rlimit
b) ulimit
c) setrlimit
d) getrlimit
iew !nswer
0# 1hich option of ls command used to view file inode number
a) %l
b) $o
c) %a
d) %i
iew !nswer
&(# find 4 $name \[@ will
a) Aist all files and directories recursively starting from 4
b) Aist a file named [ in 4
c) Aist all files in 4 directory
d) Aist all files and directories in 4 directory
iew !nswer
&# 1hich command is used to display the octal value of the text
a) octal
UNIT I<
Page 0*
b) textBoct
c) oct
d) od
iew !nswer
"# 1hich command is used to view compressed text file contents
a) cat
b) type
c) Kcat
d print
iew !nswer
'# 1hich command changes a file@s group owner
a) cgrp
b) chgrp
c) change
d) group
iew !nswer
4# 1hich command is used to extract intermediate result in a pipeline
a) tee
b) extract
c) exec
d) none of the above
iew !nswer
)# 1hich command is used to extract a column from a text file
a) paste
b) get
c) cut
d) tar
iew !nswer
a) du
b) ds
c) dd
d) dds
iew !nswer
7# 1hich command is used to perform bac+up in unix/
a) bac+up
b) cpio
c) Kip
d) gKip
iew !nswer
,# 1hich command creates an empty file if file does not exist/
a) cat
b) touch
c) ed
d) read
iew !nswer
a) %b
6# 1hich command is used to display dis+ consumption of a specific
directory
0# 1hich option of rm command is used to remove a directory with all its
subdirectories
UNIT I<
Page 0,
b) %o
c) %p
d) %r
iew !nswer
&(# 1hich command is used to identify file type/
a) Type
b) 6ile
c) 6info
d) -nfo
iew !nswer
&# Mommand used to determine the path of an executable file is
a) which
b) where
c) wexec
d) what
iew !nswer
"# Mommand used to count number of character in a file is
a) grep
b) wc
c) count
d) cut
iew !nswer
a) less
b) sed
c) pause
d) grep
iew !nswer
a) ls $l
b) ls $la
c) du
d) ls $a
iew !nswer
)# 1hich of the following command output contains userid/
a) ls
b) help
c) date
d) ls %l
iew !nswer
a) ls %a5
b) ls %a
c) ls %5
d) ls %l
iew !nswer
'# 1hich of these commands could you use to show one page of output at
a time/
4# 1hich commands will give you information about how much dis+ space
each file in the current directory uses/
6# 1hich command is used to display all the files including hidden files in
your current and its subdirectories /
UNIT I<
Page 0.
a) ssh
b) telnet
c) rsh
d) ftp
iew !nswer
,# pwd command displays
a) user password
b) password file content
c) present wor+ing directory
d) none of the mentioned
iew !nswer
a) Mhmod
b) Mhown
c) <mas+
d) Mhgrp
iew !nswer
a) cvf
b) tvf
c) xvf
d) ovf
iew !nswer
a) touch
b) grep
c) find
d) ls
iew !nswer
# 1rite the command to display the current date in the form dd4mm4yyyy#
a) date 3dd4dm4dY
b) date 3_dd4dm4dY_
c) date 34dd4dm4"(dy
d) date 3_4dd4dm4"(dy_
iew !nswer
a) man sample#txtQmore
b) cat sample#txt]more
c) cat sample#txtXmore
d) 2one of the above
iew !nswer
'# 1hich one shows the name of the operating system/
a) uname $n
7# 1hich of the following commands can be used to copy files across
systems/
0# 1hich of the following commands can be used to change default
permissions for files and directories at the time of creation
&(# 1hich tar command option is used to list the files in a tape archive
format/
&&# 1hich of the following commands will allow the user to search
contents of a file for a particular pattern
"# The command syntax to display the file \sample#txt@ one page at a time
is
UNIT I<
Page 00
b) uname $r
c) uname $o
d) uname %m
iew !nswer
4# Dow do you add .append) a file ^file&e to the example#tar file
a) no you cannot add a file to example#tar
b) tar $cvf example#tar file&
c) tar $rvf file& example#tar
d) tar $evf file& example#tar
iew !nswer
)# Dow to execute ls command inside a vi editor/
a) Vls
b) :ls
c) :Vls
d) we can@t execute
iew !nswer
a) diff
b) cmp
c) comm
d) ls $a
iew !nswer
7# To open a file file& with cursor at line number 4
a) vi 3num file&
b) vi 3set num file&
c) vi 3 ^set num_ file&
d) vi 34se nu file&
iew !nswer
,# sed is a command typically used for
a) Gerform complex calculations
b) Gerform 6-6? based non$bloc+ing -4?
c) Eodify4print selective contents of a file
d) 2one of the mentioned
iew !nswer
a) tal+
b) write
c) chat
d) transmit
iew !nswer
&(# 1hich screen manipulation command sets the screen bac+ to normal/
a) tput cup
b) tput smso
c) tput rmso
d) tput blin+
iew !nswer
&&# 1hich command will you use to see the available routes/
6# 1hich command gives the first byte where the difference is in the file&
> file"/
0# 1hat communication command provides communication to another
user logged on by writing to the bottom of their terminal/
UNIT I<
Page 0@
a) show route
b) route status
c) netstat $r
d) none of the mentioned
iew !nswer
UNIT <
Page 0A
# Each process has uniCue
a) fd table
b) file table
c) inode table
d) data bloc+ table
iew !nswer
"# 6ile descriptor table indexes which +ernel structure/
a) struct file
b) strruct fsBstruct
c) filesBstruct
d) struct inode
iew !nswer
a) (
b) &
c) "
d) '
iew !nswer
4# The file system information is stored in
a) Noot bloc+
b) *uper Nloc+
c) -node Table
d) Iata Nloc+
iew !nswer
)# *witch table is used by
a) device special file
b) directory file
c) fifo
d) lin+ file#
iew !nswer
6# 1hat is the use of fcntl function/
'# 1hat is the default number of files open per user
process/
UNIT <
Page @>
a) loc+ing a file
b) reading the file descriptor flag
c) changing the file status flag
d) all the above
iew !nswer
a) read.)
b) open.)
c) stat.)
d) fcntl.)
iew !nswer
,# printf.) uses which system call
a) open
b) read
c) write
d) close
iew !nswer
0# read.) system call on success returns
a) (
b) $&
c) number of character
d) none
iew !nswer
&(# 1hich system call is used to create a hard lin+/
a) hardlin+
b) lin+
c) symlin+
d) ln
iew !nswer
&&# namei.) is
7# 1hich function can be used instead of the dup" to
duplicate the file descriptor/
UNIT <
Page @1
a) !2*- M library function
b) M library function
c) *ystem call
d) +ernel routine
iew !nswer
&"# dup".&,()
c) will produce compilation error
d) 2one of the above
iew !nswer
?btaining of the G-I can be done by the utility
a) pgrep
b) pidof
c) ps
d) all of the mentioned
a) 4etc4passwd
b) 4etc4groups
c) 4etc4login
d) 4etc4profile
iew !nswer
"# The encrypted password of a user is stored in
a) 4etc4shadow
b) 4etc4enpasswwd
c) 4etc4#passwd
d) 4etc4passwd
iew !nswer
'# ! user can change the default log$in shell using
a) chmod
b) chsh
c) rmsh
a) closes the stdout and copies the stdin descriptor to
stdout
b) closes the stdin and copies the stdout descriptor to
stdin
&# <ser@s Grimary 9roup id is listed in which file, at
the time of creation of the user .?n a standard <nix
system)
UNIT <
Page @$
d) tchsh
iew !nswer
a) uid
b) suid
c) euid
d) gid
iew !nswer
)# The 4etc4passwd file doesn@t contain
a) userid
b) home directory for a user
c) login shell name
d) 2one of the above
iew !nswer
6# <ser id ( is
a) !n innvalid user id
b) The id of the root user
c) The id of a user when the user@s account is deleted
d) 2one of the above
iew !nswer
7# The login shell is
a) The shell program that runs when the user logs in
d) 2one of the above
iew !nswer
a) <ser can@t change the password
b) passwd
c) passd
d) pwd
iew !nswer
0# 1hat does the following command do /
who X wc %l
a) Aist the number of users logged in
b) Aist the users
c) Aist the number of users in the system
d) Iisplay the content of who command
iew !nswer
&(# Ny default, a Ainux user falls under which group/
a) staff
b) others
c) same as userid .<G9)
d) system
iew !nswer
4# 1hich of the following identifiers associated with a
process decide its privilege level
b) The shell program that authenticates the user while
logging in
c) Mommon shell for all the users that belong to the
same group
,# 1hich of the following command can be used to
change the user password/
UNIT <
Page @'
a) 4etc4passwd
b) 4etc4shadow
c) 4etc4group
d) 4etc4profile
iew !nswer
View Answer
a) -t is terminated
b) -t@s execution is suspended
c) *TI-2 is made available to it
d) 2one of the mentioned
iew !nswer
a) bg
b) fg
c) bac+ground
d) forground
iew !nswer
'# Dow to run a process in the bac+ground/
a) >
b) [
c) /
d) X
iew !nswer
&&# 1hich of the following files need to be referred for
user@s secondary group/
&"# The ls %l output for 4etc4passwd and
4usr4bin4passwd is as follows:
#rw#rw#r## 1 root root )E'9 Apr )$
163%' /etc/passwd
#r#sT(T( 1 root root 19''E Ja1 )%
')36' /usr/bin/passwd

U a userA not be!onging to the


group LrootVA runs the passwd
e(ecutab!e in an attempt to modi1
his passwordA then which o the
o!!owing is true:
a) password change ai!s since user
does not ha*e permission to
update /etc/passwd i!e
b) password change is successu!
because the program runs as root
c) passwd change program runs in
>erne! mode where write access to
the /etc/passwd i!e is possib!e
d) /etc/passwd is a specia! i!e and
the s1stem b1 deau!t a!!ows a!!
users to update it
&# -f a program executing in bac+ground attempts to
read from *TI-2
"# 1hich command is used to bring the bac+ground
process to forground/
UNIT <
Page @*
a) su
b) root
c) chroot
d) user
iew !nswer
a) +ill
b) bg
c) fg
d) ps
iew !nswer
6# 1hich signal is sent by the command ^+ill $0 _ /
a) -2T
b) TE5E
c) F-AA
d) *T?G
iew !nswer
a) status 5 means running
b) *tatus * means sleeping
c) *tatus E means exited
d) *tatus R means Kombie
iew !nswer
a) the child process becomes defunct
b) the parent process becomes defunct
d) none of the above
iew !nswer
0# ! user issues the following command seCuence:
: a#out >
: bash
: a#out >
a) The second a#out process is also terminated
b) The second a#out process becomes a defunct process
c) The first a#out process becomes a Kombie process
d) init process becomes parent of second a#out process
iew !nswer
4# 1hich command can be executed by a user who is
already logged into the system, in order to change to
the root user/ .type the command without any
parameters)
)# Grocess information in the current shell can be
obtained by using
7# 1hich of the following values for *T!T column of
ps command is not true:
,# 1hen a child process exits before the parent process
exits, which of the following is true:
c) if the parent process does not handle *-9MDAI, the
child process becomes a Kombie
-f the user +ills the bash process, then which of the
following is true/
UNIT <
Page @,
a) F-AA
b) T*TG
c) TE5E
d) -2T
iew !nswer
.a) nice
.b) renice
.c) priority cannot be changed for a running process
.d) only superuser can change the priority
iew !nswer
&"# nohup is used to
a) automatically hang up the process after logout
b) continue the process after logout
c) create bac+groung process
d) manually hang up the process after logout
iew !nswer
&(# The signal sent to a process when the Mtrl$M +ey is
pressed is
&&# we can change the priority of a running process
using
UNIT I & $ m
Page @.
4hat is a file system!
()plain Inode Structure in UNI+!
Dist the #uilding #lock primities of UNI+ with e)amples.
UNIT <&$m
Page @0
The ps command indicate from which terminal a process was initiated.
a. True
#. -alse
% time sharing system is always a multiprogramming system.
a. True
#. -alse
UNIT I&*m
Page @@
1.1 4hat is an operating system! 4hat are the functions of the operating system!
1.$ Descri#e the users iew of the operating system.
1.' Name two deices that are used as input deices only. Name two deices that are
used as output deices only. Name at least one deice that can #e used as an input
as well as output deice.
1.* ()plain the difference #etween multi&programming and time sharing.
1., 4hen do we say a system is Emulti&programmingE! 4hen do we say it is an Eon&
lineE system!
1..
Fie an e)ample of an operational enironment when the system would hae to
#e #oth multi&programming and on&line system.
1.0 ()plain the difference #etween platform and enironment.
()plain the details Operating System serices.
()plain the details a#out the User perspectie
()plain the eolution of UNI+ operating system.
4rite the reasons for popularity and success of UNI+ operating system.
UNIT II&*m
Page @A
4hat is inode in UNI+!
Draw a diagram process e)ecution leels.
Differentiate user mode G kernel mode
@. 4hat are the ' leels of UNI+ operating system!
A. Define System call interface
1>. 4hat are the su#systems of UNI+ OS!
4hat are the fields of super #lock!
Fie different layers of UNI+ %rchitecture.()plain the intended
purposes of each.
()plain the architecture of UNI+ systems with diagram.
4hat is a system call! ()plain with e)ample.
4hat is #uilding #lock primitie! ()plain #uilding #lock primities in UNI+.
. ()plain the characteristics of UNI+ file system with e)ample.
0 H@I
@ ()plain the serices proided #y the kernel.
A H0I
1> ()plain user mode and kernel mode.
11 H.I
Draw and e)plain the #lock diagram of system kernel.
H@I
()plain data structures for file su#system.
H@I
()plain data structures for process. Draw and e)plain process state transition
H0I
diagram
UNIT III&*m
Page A>
4hat is root file system!
UNIT I<&*m
Page A1
4rite a shell script to accept a num#er and a word as command line
arguments and print the word the gien num#er of times on each line.
4hat happens if a num#er and a string is gien as command line
arguments!
4rite a shell script to find the file with the ma)imum si/e in the current
directory.
4rite a shell script to find the num#er of ordinary files and directory in
the current directory.
4hat is the first step in #ooting a UNI+ OS!
4rite a shell script to accept two filenames and check if #oth e)ist. If
the second filename e)ists3 then the contents of the first filename should
#e appended to it. If he second filename does not e)ist then create a new
file with the contents of first file.
()plain the significance of scripts in administration.
H0I
()plain pipe and redirection with an e)ample.
()plain grep command in detail.
H0I
4rite steps to create #ash scripts from commands.
H.I
()plain with e)ample how to handle input G output in #ash.
H0I
4rite shell script to demonstrate use of command line arguments.
H0I
()plain array management in #ash with an e)ample.
H@I
4hat is a Jegular ()pression! ()plain with e)amples.
H@I
()plain fundamental data types in Perl with e)amples.
H0I
4rite a Perl program to copy contents of one file to another.
H0I
4rite a Perl program for accepting and alidating input.
H@I
()plain how Perl can #e used as filter.
H.I
9ompare Perl <s Python.
H@I
4rite Python script for input alidation.
H0I
Fie the guidelines for scripting #est practices.
UNIT <&*m
Page A$
4hat are some of the options aaila#le in UNI+ command ps! Fie description
of at least two options.
11. Define Kom#ie State process transition
()plain the details a#out process states G state Transition.
4hat are the first ' steps of process states and transition! Define
conte)t of the process
()plain user priorities and kernel priorities
UNIT <I&*m
Page A'
Define 5ounting and Unmounting system call and their synta).
()plain how a file is mounted and unmounted from the file structure

You might also like