McqMate
1. |
Unix OS was first developed by |
A. | dennis ritchie |
B. | bjarne stroustrup |
C. | ken thompson |
D. | brian kernighan |
Answer» C. ken thompson |
2. |
Unix OS was first developed at |
A. | microsoft corp. usa |
B. | at & t bell labs, usa |
C. | ibm, usa |
D. | borland international, usa |
Answer» B. at & t bell labs, usa |
3. |
Unix is written in |
A. | c language |
B. | ada language |
C. | perl language |
D. | pascal language |
Answer» A. c language |
4. |
Unix is a |
A. | single user, single tasking os |
B. | single user, multi-tasking os |
C. | multi-user, multi- tasking os |
D. | none |
Answer» C. multi-user, multi- tasking os |
5. |
Which of the following is a command for searching a pattern in a file? |
A. | find |
B. | grep |
C. | look up. |
D. | none |
Answer» B. grep |
6. |
Unix Command can be typed in |
A. | lower case |
B. | upper case |
C. | both the cases |
D. | none |
Answer» A. lower case |
7. |
Shell Program is stored in a file called |
A. | unix |
B. | sh |
C. | dd |
D. | cc |
Answer» B. sh |
8. |
WhicBh shell offers a command history feature |
A. | c shell |
B. | visual shell |
C. | bourne shell |
D. | korn shell |
Answer» C. bourne shell |
9. |
The minimum number of links for any directory file are |
A. | 3 |
B. | 4 |
C. | 1 |
D. | 2 |
Answer» D. 2 |
10. |
The default value of Umask is |
A. | 1024 |
B. | 4021 |
C. | 0022 |
D. | 1001 |
Answer» C. 0022 |
11. |
Binary executable required for system administration is usually placed in ________ directory. |
A. | letc |
B. | lusr |
C. | ldev |
D. | none |
Answer» A. letc |
12. |
All user directories are usually placed in _________ directory. |
A. | letc |
B. | lusr |
C. | ldev |
D. | none |
Answer» B. lusr |
13. |
If there are three links for a file then the number of copies of the file would be |
A. | one |
B. | two |
C. | three |
D. | four |
Answer» A. one |
14. |
After typing the contents of file test created by you by giving the command cat>test you save the contents by |
A. | pressing the keys ctrl-c |
B. | typing save and pressing enter |
C. | pressing esc key |
D. | pressing ctrl-d |
Answer» D. pressing ctrl-d |
15. |
The file for which we do not have write permission can be deleted using the command |
A. | rm-i file |
B. | rm-i file |
C. | rm-r-file |
D. | rm-f-file |
Answer» D. rm-f-file |
16. |
The permission 746 can be represented as |
A. | rwxrwx- -x |
B. | rw- -w-r-x |
C. | rwxr-xr-x |
D. | rwxr- -rw– |
Answer» D. rwxr- -rw– |
17. |
A Sticky bit applies to a file would mean that |
A. | no one can remove it |
B. | it would stick around in memory even when its execution is over |
C. | next time you login it would get executed on its own |
D. | none of the above |
Answer» B. it would stick around in memory even when its execution is over |
18. |
The command pwd gives |
A. | present working directory |
B. | password in encrypted form |
C. | password in decrypted form |
D. | none |
Answer» A. present working directory |
19. |
Which of the following is not a unix command |
A. | cd |
B. | rm |
C. | pwd |
D. | del |
Answer» D. del |
20. |
The size of any block in the unix file system is |
A. | 512 bytes |
B. | 1024 bytes |
C. | 2048 bytes |
D. | any of the above |
Answer» D. any of the above |
21. |
To find the block size on your file system the command is |
A. | blksz |
B. | szblk |
C. | chksz |
D. | cmchk |
Answer» D. cmchk |
22. |
Each entry in inode table is of size |
A. | 64 kb |
B. | 32kb |
C. | 32 bytes |
D. | 64 bytes |
Answer» D. 64 bytes |
23. |
The program contained in boot block, that loads kernel into memory is called |
A. | disk bootstrap program |
B. | master boot program |
C. | shell program |
D. | none of the above |
Answer» A. disk bootstrap program |
24. |
The state of the file system is contained in |
A. | boot block |
B. | a special block created by book block |
C. | super block |
D. | none of the above |
Answer» C. super block |
25. |
Which file gets executed when we use the passwd command |
A. | /etc/passwd |
B. | /etc/pwd |
C. | /bin/passwd |
D. | /passwd |
Answer» C. /bin/passwd |
26. |
The command cal j 1997 would give the output as |
A. | the calendar of jan, june and july 1997 |
B. | only calendar of jan 1997 |
C. | an error |
D. | none of the above |
Answer» C. an error |
27. |
The output of command banner “Unix shell programming” would be |
A. | a banner showing ‘unix’,’shell’ and ‘programming’ words displayed in separate lines |
B. | a banner showing ‘unix shell’ in one single line |
C. | nothing |
D. | a banner showing ‘unix shell programming’ in one line. |
Answer» B. a banner showing ‘unix shell’ in one single line |
28. |
To see the last access time of various files in a file system the command is |
A. | is-iu |
B. | is-i |
C. | is-acc |
D. | is-mt |
Answer» A. is-iu |
29. |
To ascertain what are the contents of the file in your the system the best way would be |
A. | do a cat command on each file and find its contents |
B. | use the command cat* |
C. | use the command file* |
D. | none of the above |
Answer» C. use the command file* |
30. |
Which of these is not a command of Unix related with DOS |
A. | dosdir a:proj |
B. | doscopy trial a:/ |
C. | doscp/home/proj/prg a:/ |
D. | dosls |
Answer» B. doscopy trial a:/ |
31. |
Which of following commands do not belong to multiple file editing commands |
A. | :n! |
B. | :q! |
C. | :rnew! |
D. | all the above |
Answer» D. all the above |
32. |
The difference between the commands ps –e and ps –a is |
A. | ps –e gives details of every process running in memory whereas ps –a gives output for all the process that you have launched |
B. | ps –e gives details of every process running in memory whereas ps –a gives details of all user processes |
C. | no difference , both give same output |
D. | none of the above |
Answer» B. ps –e gives details of every process running in memory whereas ps –a gives details of all user processes |
33. |
The father of all processes is |
A. | root |
B. | sh |
C. | sched |
D. | init |
Answer» C. sched |
34. |
The process id numbers of the processes vhand,bdflush,sched and init are |
A. | 1,2,3 and 4 |
B. | 2,3,0 and 1 |
C. | 3,4,1 and 2 |
D. | 0,1,2 and 3 |
Answer» B. 2,3,0 and 1 |
35. |
Which of the following is not true regarding the command $ nohup cat *.let | nohup sort >f1 & |
A. | the process would die if the user logs out before the command’s execution is over |
B. | if the user logs out the output of sort would be dtored in a file nohup.out |
C. | it is optional to give nohup before sort |
D. | this background process is also known as a deamon process |
Answer» A. the process would die if the user logs out before the command’s execution is over |
36. |
Which of the following is not true regards the kill command |
A. | super user can kill deamon processes |
B. | for sure kill the signal no is 9 |
C. | there is no surety that the shell process will get killed by the command kill |
D. | using kill command you can kill other user’s processes too |
Answer» A. super user can kill deamon processes |
37. |
Which of the following is not true |
A. | the at command permits you to receive messages only by mail |
B. | a person’s login name appears in the file at.allow if he is not allowed to use the at command |
C. | both are false |
D. | both are true |
Answer» C. both are false |
38. |
For a person to receive messages he should have his terminal set to a parameter which will allow him receive messages.The command to set this parameter is |
A. | message –on |
B. | msg –o |
C. | mesg –y |
D. | message–y |
Answer» C. mesg –y |
39. |
The command that unix offers to a user to find out whether he can send messages to a particular terminal are |
A. | finger and who |
B. | finger –mesg and who –t |
C. | finger –i and who –t |
D. | finger –i and who –t |
Answer» D. finger –i and who –t |
40. |
If the user has read a news item he cannot read it again because of creation of the file |
A. | _news_time |
B. | news.time |
C. | .news.time |
D. | .news_time |
Answer» D. .news_time |
41. |
To read the stale news the option available is |
A. | news –a |
B. | delete the file /usr/news |
C. | delete the file _news.time |
D. | delete the file .news_time |
Answer» A. news –a |
42. |
The message of the day is stored in a file called |
A. | /etc/profile |
B. | /etc/motv |
C. | .profile |
D. | autoexec.bat |
Answer» B. /etc/motv |
43. |
The incoming mail of user with the login name aa12 is stored in the file |
A. | /usr/spool/mail/aa12 |
B. | /usr/aa12/mbox |
C. | /spool/mail/aa12 |
D. | /usr/aa12/.mbox |
Answer» A. /usr/spool/mail/aa12 |
44. |
.mailrc is the file |
A. | which stores the incoming mail |
B. | which is used to type the mail to be sent |
C. | which is invoked when the mail command is executed |
D. | which permits you to customize the vi environment |
Answer» C. which is invoked when the mail command is executed |
45. |
The escape sequence \033[4m is used to |
A. | underlying characters |
B. | mark them as bold |
C. | display them in reverse video |
D. | none of the above |
Answer» B. mark them as bold |
46. |
Which of the following assignments is illegal |
A. | a=’ls’ |
B. | b=’ls –l’ |
C. | c=’1972’ |
D. | d=’who | grepaal’ |
Answer» C. c=’1972’ |
47. |
Which of the following assignment is illegal |
A. | a=’cat file’ |
B. | a=100 b=50 |
C. | age=25 |
D. | all the above |
Answer» C. age=25 |
48. |
A null variable a can be created using |
A. | a= |
B. | a=’’ |
C. | a=”” |
D. | all the above |
Answer» D. all the above |
49. |
The shell metacharacter $# represents |
A. | total number of arguments supplied to the shell script |
B. | total number of files in the current directory |
C. | total number of users who have logged in |
D. | total number of processes running in the background |
Answer» A. total number of arguments supplied to the shell script |
50. |
When we are executing a shell script the shell acts as |
A. | an interpreter |
B. | a compiler |
C. | an operating system |
D. | none of the above |
Answer» A. an interpreter |
51. |
On executing a statement set -3+1 |
A. | $1 would be -3 |
B. | $1 would be – |
C. | $1 would be set |
D. | this command would result into an error |
Answer» D. this command would result into an error |
52. |
On executing the command Shift $v |
A. | the positional parameters would be shifted by the value of the variable v |
B. | the positional parameters would be shifted by 1 |
C. | the positional parameters would not be shifted at all |
D. | this command would result into an error |
Answer» A. the positional parameters would be shifted by the value of the variable v |
53. |
Which of the following shows the correct hierarchy of arithmetic operations in shell |
A. | (),**,* or /, + or – |
B. | (), **, *,/,+,- |
C. | (),**,/,*,+,- |
D. | (),/,% or *,- or + |
Answer» D. (),/,% or *,- or + |
54. |
Which of the following is allowed in an arithmetic statement involving exprinstruction |
A. | [] |
B. | {} |
C. | () |
D. | none of the above |
Answer» C. () |
55. |
The statement z=’expr 5/2’ would store in z a value |
A. | 2.5 |
B. | 3 |
C. | 2 |
D. | 0 |
Answer» C. 2 |
56. |
The expression expr -7 % 2evaluates to |
A. | 1 |
B. | -1 |
C. | -3.5 |
D. | 0 |
Answer» B. -1 |
57. |
The expression expr -2 % 7 evaluates to |
A. | 2 |
B. | -2 |
C. | 0 |
D. | 0.285 |
Answer» B. -2 |
58. |
Hierarchy decides which operator |
A. | is most important |
B. | is used first |
C. | is fastest |
D. | operates on largest numbers |
Answer» B. is used first |
59. |
The break statement is used to exit from |
A. | an if statement |
B. | a for loop |
C. | a program |
D. | none of the above |
Answer» B. a for loop |
60. |
An until loop ensures that the statement within the loop get executed |
A. | only once |
B. | atleast once |
C. | not even once |
D. | none of the above |
Answer» D. none of the above |
61. |
Which option will be used with sort command to start sorting after the nth column of the (m+1)th field |
A. | –m.n |
B. | +m.n |
C. | +n.m+1 |
D. | +(m+1).n |
Answer» B. +m.n |
62. |
Which command is used to terminate a process |
A. | shutdown |
B. | haltsys |
C. | cancel |
D. | kill |
Answer» D. kill |
63. |
The command is used to compare the files is known as |
A. | comp |
B. | cmp |
C. | do |
D. | ccp |
Answer» B. cmp |
64. |
The command which transcribes the standard input to the standard output and also makes a copy of the same in a file is |
A. | tee |
B. | tr |
C. | sort |
D. | grep |
Answer» A. tee |
65. |
Which command is used to remove a directory |
A. | rd |
B. | rmdir |
C. | dldir |
D. | rdir |
Answer» B. rmdir |
66. |
Which of the following keys is used to replace a dingle character with new text |
A. | s |
B. | s |
C. | r |
D. | c |
Answer» B. s |
67. |
Which command is used to extract a specific columns from the file |
A. | cat |
B. | cut |
C. | grep |
D. | paste |
Answer» B. cut |
68. |
Which command sends the word count of the file infile to the newfile. |
A. | wcinfile>newfile |
B. | wcnewfile |
C. | wcinfile - newfile |
D. | wcinfile | newfile |
Answer» A. wcinfile>newfile |
69. |
Which command is used to remove the read permission of the file 'note' from both the group and others? |
A. | chmodgo+r note |
B. | chmodgo+rw note |
C. | chmod go-x note |
D. | chmod go-r, 4-x note |
Answer» D. chmod go-r, 4-x note |
70. |
Which command is used to concatenate all files beginning with the string 'emp' and followed by a non-numeric characters? |
A. | cat emp[!0-9] |
B. | more [emp][!0-9] |
C. | cat emp[x-z] |
D. | cat emp[a-z] |
Answer» A. cat emp[!0-9] |
71. |
Which command will be used with vi editor to insert text to left of cursor? |
A. | s |
B. | s |
C. | a |
D. | i |
Answer» D. i |
72. |
In vi editor, forward search is performed using the command. |
A. | :pat |
B. | :pat |
C. | /pat |
D. | all of the above |
Answer» D. all of the above |
73. |
Which of the following special shell variables is used to process number of the last background job? |
A. | $! |
B. | $# |
C. | $0 |
D. | $* |
Answer» A. $! |
74. |
Which option will be used with ps command to slow the entire command line of the process being run? |
A. | -4 |
B. | -f |
C. | -1 |
D. | -4 |
Answer» B. -f |
75. |
Which of the following command addresses all users who are currently hooked on? |
A. | write |
B. | |
C. | wall |
D. | mesg |
Answer» C. wall |
76. |
Which of the following commands is used to identify the type of file by context? |
A. | ls |
B. | cat |
C. | file |
D. | more |
Answer» C. file |
77. |
The filed separator in cut command is specified with |
A. | -a option |
B. | -d option |
C. | -r option |
D. | -x option |
Answer» B. -d option |
78. |
Which of the following options will be used to display number of blocks used by a file? |
A. | -c |
B. | -i |
C. | -d |
D. | -s |
Answer» D. -s |
79. |
Which option will be used with touch command to change the access time? |
A. | -a |
B. | -b |
C. | -t |
D. | -h |
Answer» A. -a |
80. |
Which command is used to make all files and sub-directories in the directory (progs) executable by all users? |
A. | chmod -r a+xprogs |
B. | chmod -r 222 progs |
C. | chmod -1 a+xprogs |
D. | chmod -x a+xprogs |
Answer» A. chmod -r a+xprogs |
81. |
Which command is used to display and create files? |
A. | cat |
B. | vi |
C. | ed |
D. | lyrix |
Answer» A. cat |
82. |
The second set of the three permissions (r-) indicates that |
A. | group has read permission only |
B. | other has read permission only |
C. | owner has read permission only |
D. | group has write permission only |
Answer» A. group has read permission only |
Done Reading?