Sunteți pe pagina 1din 5

ALL4AJOB

Placement training programme


Topic: Unix and Networking.

Instructions:
1. All questions carry one (1) mark each.
2. The time limit for the test is 30 minutes.
3. Each wrong answer carries a negative 0.25 marking.
4. Please cooperate with your Placement coordinators. You can start by giving them all
your money.

1. To display the contents of a executable file the following 7. ls || date will


command can be used A. print the name of the files in the current directory
(a) cat (b) od (c) vi (d) ed B. print today's date and time
C. (A) followed by (B)
2. Assume the current directory contains 10 files and does'nt D. none of the above
contain 'temp'. What will be the output of the following
commands? 8. The built-in shell variable $$ refers to
$ls > temp A. printing numbers in dollar format
$wc -l temp B. process id of last command
(a) 9 (b) 10 (c) 11 (d) undefined. C. process id of last background command issued
D. process id of current shell
3. If one wants the output of one command (command1) to be
printed in the printer as well as to be added to another file 9. dd is mainly used for
(outfile) which one of the following is a correct command A. dealing with raw, unformatted data, whatever the
he can give? source
(a) $command1 outfile|tee lpr B. dealing with data dictionary
(b) $tee -a command1 | lpr C. deleting a directory
(c) $ command1 | tee outfile | lpr D. none of the above
(d) $ command | tee -a outfile |lpr

4. In the shell program set -x will cause 10. In a standard directory lay out /etc is the directory where
A. Execution of the commands in the background a) binary files of programs such as who and ed reside
B. Execution of the commands in verbose mode b) Mail programs reside
C. Exit from the shell program. c)various administrative files such as password file and
D. Exit from the shell program after executing the next config files reside
command d) All user names are recorded.

5. ACL in UNIX refers to 11. Which of the following is true regarding the UNIX OS
A. Access Control List (i) Multiuser Operating System
B. Action Control List (ii)Multitasking Operating System
C. Application Command Language (iii) Real timing Operating System
D. Advanced C language A. i only B. i and ii only C. i and ii and iii only
D. i and ii
6. The command echo *
A. will print * on the screen 12. ln command is used to
B. will print contents of all the files in the current A. link object codes into a executable code
directory B. give two names to the same file
C. will list the files in the current directory C. set line numbers for the file
D. will print the contents of all shell variables D. none of the above
13. nohup command is used for
A. protecting the execution of programmes from aborting 20. The command tr a-z 0-9 < x
when A. converts all the digits to lowercase alphabets
hangup signal is received B. converts all the lowercase alphabets to digits
B. changing the execution priority of the programes C. will give syntax error
C. not hanging up of the modem D. none of the above
D. disconnecting a node from the system

14. SCCS is a 21. In unix 'ls 'stores contents in


A. Tool for maintaining large programmes in a production A. Inode block
environment B. Directory
B. Communication Protocol C. Stack
C. Shell Programming Language D. Queue
D. String processing utility
22. $PS1= pwd
15. Which one of the following is true as long as UNIX is $export PS1
concerned results in
A. One can do programming in C only a). your primary prompt being your current directory
B. It can support terminals capable of printing only b). " " and secondary prompts being the current dir
uppercase c). " " prompt being your home dir
characters d). " " and secondary prompts being the home dir
C. The text files are sorted as it is in MS-DOS e). None of the above.
D. None of the above
23. If you type in the command….
16. Inside vi editor to replace the string 10/$$/94 with $nohup sort employees > list 2> error_out &
10/$$/92 globally the following command can be used and log off ,the next time you log in . the output will be
A. :1,$s/\/10\/\$\/94/10\/\$\$\/92/g a). in a file called list and the error will be typed in a file
B. :1,$s/\/10\/\$\/94/10\/\$\/$92/ error_out
C. :s10/$$/92/10/$$/92/g b). there will be no file called list or error_out
D. :1,$s/10\/\$\$\/94/10\/\$\$\/92 c). error will be logged in a file called list and o/p will be in
error_out
d). you will not be allowed to log in
17. The cd command without any argument e). none of the above
A. will print the current working directory
B. will make the home directory as current directory 24. In UNIX a file's i-node
C. will ask for the directory to be used as the current a)is a data structure that defines all specifications of
directory a file like the file size ,number of lines to a
D. will go to the previous directory file ,permissions etc.
b)is a stack like data structure
c)is a file in the current directory
18. nice command is used d)none of the above
A. to increase/decrease execution priority of a command
B. to compress a file 25. The UNIX shell
C. to run a program at a later time a).does not come with the rest of the system
D. to set the key board response slower b).forms the interface between the user and the kernel
c) does not give any scope for programming
d) does not allow calling one program from with in another
19. What will be the output of the following command e) all of the above
sequence
$ x='I am x'
$sh 26. The standard source for standard input , standard output
$echo $x and standard error is
A. I am x a) the terminal
B. Blank line b) /dev/null
C. x c) /usr/you/input, /usr/you/output/, /usr/you/error respectively
D. None of the above d) None
27. The redirection operators > and >>
a) do the same function 33. Send Message and postmessage are
b) differ : > overwrites, while >> appends a)send message puts the message in the message queue and
c) differ : > is used for input while >> is used for output results, postmessage processes the message immediately
d) differ : > write to any file while >> write only to standard b)Sendmessage processes the message
output immediately,postmessage puts
e) None of these the message in the queue and returns
c) Both put the message in the message queue and returns
d) Both process the message immediately
28. The command
$grep first second third /usr/you/myfile
a) prints lines containing the words first, second or third 34. Which of the following message is used to limit the size
from the file /usr/you/myfile of teh Window
b) searches for lines containing the pattern first in the files a)WM_SIZE
second, third, and /usr/you/myfile and prints them b)WM_PAN
c) searches the files /usr/you/myfile and third for lines c)WM_MAXWIN
containing the words first or second and prints them d)None
d) replaces the word first with the word second in the files
third and /usr/you/myfile

35. until who|grep mary


29. How can u specify the permission of a file in unix so that it do
can sleep 60
be read and used by everyone but can't be changed by anyone done
else. a) is syntactically incorrect
A.755 b) waits 60 seconds irrespective of Mary being logged in or
B.744 not
C.644 c) waits until Marry is logged in
D.None d)waits till Mary exited

30. The very first process created by the kernel that runs 36. The UNIX system call that transforms an executable
till the kernel process is halted is binary file into
a)init a new process is
b)getty a)execl()
c)fork b)execv()
d)none c)execle()
d)execve()
e)All of the above
31. Which of the following is true
a)UNIX is a time sharing multi-user OS
b)UNIX has a device independent file system 37. Which of the following is true about fork()
c)UNIX is full duplex a)It reduces CPU usage by dividing workload
d)UNIX has command interpreter b)causes the creation of a new process ,the CHILD process
e)All of the above with a new process ID
c)It makes error handling easy.
d)It reduces the hunger problem that is plaguing our world.
32. Inter process communication in UNIX can be achieved
using
a)pipe 38. The command :
b)Message $ln /bin/mail /usr/you/bin/m
c)Semaphores a)will not be executed because you are linking files
d)Shared Memory across different file systems
e)All of the above b)results ln /bin/main being the same file as /usr/you/bin/m
c)results in 2 links to the file mail
d)none
39. Which of the following network topologies among the list 42. The function of a modem is to convert signals. Identify the
below is incorrect? correct signals it converts.
a.Star a.Analogue to Digital
b.internet b.Analogue to Baud rate
c.Ring c.Baud rate to Analogue
d.Bus d.Digital to Binary

40. Which of the following is not a function of a repeater? 43. Which of the following is not a LAN – Architecture?.
a.Uses Jumper Settings a.Protocol architecture
b.Transmits data in both directions b.Media access control
c.No Buffering c.Logical Protocol
d.Joins two(2) segments of cables d.Logical Link Control

44. Identify the statement which best describes TCP and UDP.
a.TCP is a connection oriented Protocol whiles UDP
41. Which level of the TCP/IP reference model routes is a datagram service
data/information across a network channel ? b.TCP is a protocol for the Network Layer of the OSI
a.Application layer c.UDP and TCP could be used interchangeably
b.Data Link Layer d.TCP is an advanced protocol whiles UDP is a
c.Transport Layer single protocol
d.Network Layer

45.Which of the following statement is true about FLOW


CONTROL? 48. Which of the following standards apply to logical link
a.Flow control is a function performed by a receiving entity to control?
limit the amount or rate of data on a network. a.IEEE 802.3
b.Flow control adjusts the weights on a network b.IEEE 802.2
c.Flow control is a function performed by the MODEM c.IEEE 802.5
d.Flow control is an advanced form of network management d.IEEE 802.4

49. Which of the following statements is a true description of


46.Identify the most suitable description for ERROR fibre Optic Cable.
CONTROL? a. Fibre optic cables transfer data in a mesh
a.Error control is an activity that manages deadlock. b. Fibre optic cables transfer data in light form
b.Error control is an advanced form of parity bit c. Fibre optic cables are similar to coaxial cables
c.Error control is a sub-function of a modem and Hub d. None of the above
d.Error control is needed to guard against loss or
damage of data 50. Which of the following is not a routing strategy?
a. Fixed routing
47.Which of the following topologies is used for Ethernet? b. Adaptive routing
a.Star c. Random routing
b.Bus d. Flooding
c.Ring
d.All of the
above
1b 11 a 21 a 31 e 41 b
2c 12 b 22 e 32 e 42 a
3d 13 a 23 a 33 b 43 c
4d 14 a 24 a 34 a 44 a
5a 15 d 25 b 35 c 45 a
6c 16 d 26 a 36 e 46 d
7a 17 b 27 b 37 b 47 d
8d 18 a 28 b 38 b 48 b
9d 19 b 29 a 39 b 49 b
10 c 20 d 30 a 40 a 50 c

S-ar putea să vă placă și