UNIX - MCQ

April 4, 2018 | Author: ju_ju_ju | Category: Booting, Unix, File System, Computer File, System Software


Comments



Description

1. Unix OS was first developed by a. Dennis Ritchie b. Bjarne stroustrup c. Ken Thompson d.Brian Kernighan 2. Unix OS was first developed at a. Microsoft corp. USA b. AT & T Bell Labs, USA c. IBM, USA d. Borland International, USA 3. Unix is written in a. C language b. Ada language c. Perl language d. Pascal 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 5. Which of the following is a command for searching a pattern in a file? a. Find b. b. group c. c.look up. d. None 6. Unix Command can be typed in a. Lower case b. Upper case c. Both the cases d. None 7. Shell Program is stored in a file called a. Unix b. Sh c. Dd d. Cc 8. Which shell offers a command history feature a. C shell b. Visual shell c. Bourne shell d. Korn shell 9. The minimum number of links for any directory file are a. 3 b. 4 c. 1 d. 2 A Sticky bit applies to a file would mean that a.10. rwxr-xr-x d. Pressing the keys ctrl-c b. rm-r-file d. If there are three links for a file then the number of copies of the file would be a. rm-i file b.1001 11. rwxr.ldev d.four 14. rw. It would stick around in memory even when its execution is over . No one can remove it b. Pressing Esc key d. Letc b.-x b. Binary executable required for system administration is usually placed in ________ directory. The permission 746 can be represented as a. Typing save and pressing enter c.three d.-rw– 17. Letc b. rm-I file c. All user directories are usually placed in _________ directory a.none 13.-w-r-x c. The default value of Umask is a. One b.ldev d.lusr c. rm-f-file 16. 4021 c. After typing the contents of file test created by you by giving the command cat>test you save the contents by a. The file for which we do not have write permission can be deleted using the command a.lusr c.0022 d. rwxrwx.1024 b. a. Pressing ctrl-d 15.two c.none 12. 32 bytes d. Each entry in inode table is of size a. Blksz b.pwd d. Chksz d. Master boot program . Szblk c. None of the above 18. 512 bytes b. The size of any block in the unix file system is a. To find the block size on your file system the command is a. that loads kernel into memory is called a. Next time you login it would get executed on its own d. Password in decrypted form d. Present working directory b. 64 bytes 23.c. 32kb c. The command pwd gives a. The program contained in boot block. Which of the following is not a unix command a. 2048 bytes d. Any of the above 21. Password in encrypted form c.del 20. None 19. 64 kb b.rm c. Disk Bootstrap program b. 1024 bytes c. Cd b. Cmchk 22. Is-acc d.c. Is-mt . The command cal j 1997 would give the output as a. The calendar of jan. None of the above 24. Shell program d. A special block created by Book Block c. Is-I c. Which file gets executed when we use the passwd command a. /etc/passwd b. The state of the file system is contained in a. None of the above 25.june and july 1997 b. Only calendar of jan 1997 c. None of the above 27. /etc/pwd c. Super Block d. /bin/passwd d. An error d. To see the last access time of various files in a file system the command is a. A banner showing ‘unix shell programming’ in one line. Boot block b. Nothing d. The output of command banner “Unix shell programming” would be a. /passwd 26.’shell’ and ‘programming’ words displayed in separate lines b. A banner showing ‘unix shell’ in one single line c. 28. A banner showing ‘unix’. Is-Iu b. Touch –a 2601971240 file b. The columns 2 to 8 from file I with : between each column d. Use the command file* d. Use the command cat* c. Dosls 31. Sort command has s provision to do a numeric sort d. The command cut –f 2. To ascertain what are the contents of the file in your the system the best way would be a.29. To change the access time of a file to 12:40 PM on 26th Jan 1997 the command would be a. Doscp/HOME/Proj/Prg a:/ d. Touch –a 1240260197 file c.8 –d”:”file I would output a. Sort command sorts a file word by word rather than line by line c. Touch –a 0126124097 file d. The command to search the pattern “Hi there” in file I would be a. Dosdir a:proj b. Do a cat command on each file and find its contents b. Which of these is not a command of Unix related with DOS a. Sort is not a filter 32. Grep “Hi there” file 1 . The fields 2 to 8 from file I including the delimiter : between fields c. Which of the following is not true a. The fields 2 to 8 from file I where delimiter between fileds is: b. Doscopy trial a:/ c. Touch –a 9701261240 file 33. None of the above 34. None of the above 30. Sorting is done on the basics of first character of each line b. to save and quit vi you will use a.s/part/PART/g. Ignore case whilesearching 39. “dd5x c. A numeric value which is to be substituted by a number c. “5xdd .g stands for a. Nothing c. The whole file f1 36. :/ \<uni b. :/ \<uni\ 38. Grep Hi there file 1 c. Esc:q Enter d. After you have entered text in your file. First line of the file f1 b. To search a pattern which starts with uni the command would be a. Grep b. Grep ‘Hi there’ file 1 35. To delete 5 limes from a file that you are editing and copy them to a buffer named x you would use the command a. Global d. :\ /<uni c. Esc shift ZZ b. The command head f1 would display a. “x5dd b. Shift ZZ c. In command :l. Grep \<Hi there\> file1 d. :/ \<uni\> d. First 10 lines of the file f1 d.b.. None of the above 37. To unabbrivate the macro the command is :u<abbreciation> d. No difference .0 and 1 c.2. :n! b. Which of following commands do not belong to multiple file editing commands a. Init 44. “d5xd 40.3. None of the above 43. The process id numbers of the processes vhand. :rnew! d. 2. Root b. :q! c. The father of all processes is a. 1.d. Sched d.1 and 2 .sched and init are a. 3. Ps –e gives details of every process running in memory whereas ps –a gives details of all user processes c. both give same output d.4. Ps –e gives details of every process running in memory whereas ps –a gives output for all the process that you have launched b. Sh c. List of all abbreviations that have been set can be seen through the command :set abbr e. All the above 42. All are false 41. The difference between the commands ps –e and ps –a is a. You can yank lines from one file and paste them in to another file b.bdflush. To setup new abbrevations the command is to be issued in command mode c.3 and 4 b. Which of the following statements are not true a. 0.2 and 3 45.message –on . Which of the following is not true a. For a person to receive messages he should have his terminal set to a parameter which will allow him receive messages. This background process is also known as a deamon process 46. A person’s login name appears in the file at.m b.allow if he is not allowed to use the at command c.10 a.1.The command to set this parameter is a. Both are false d. For sure kill the signal no is 9 c.The message is echoed on the 3rd of every month at 2. Using Kill command you can kill other user’s processes too 47.The message is echoed on the 3rd of every month at 2. If the user logs out the output of sort would be dtored in a file nohup.let | nohup sort >f1 & a.The message is echoed on the 3rd of every month at 2. It is optional to give nohup before sort d. Which of the following is not true regards the kill command a. Which of the following is not true regarding the command $ nohup cat *. The at command permits you to receive messages only by mail b.d.m if it happens to be a Sunday d.out c.m c. Which statement are true if the file which contains the following line is submitted to the crontab command 10 2 3 * 0 echo “ There is no substitute for hard work” a. None of the above 49. Both are true 48.10 p.10 a. The process would die if the user logs out before the command’s execution is over b. There is no surety that the shell process will get killed by the command kill <PID of shell process> d. Super user can kill deamon processes b. news –a b.news_time 53. The incoming mail of user with the login name aa12 is stored in the file a.Delete the file _news.Delete the file .news_time 52.mesg –y d. . /usr/spool/mail/aa12 b.finger –I and who –T 51.bat 54. . /spool/mail/aa12 .Delete the file /usr/news c.The command that unix offers to a user to find out whether he can send messages to a particular terminal are a.profile d.b.time c.If the user has read a news item he cannot read it again because of creation of the file a. Autoexec. /etc/motv c.message–y 50.time d.news.finger –mesg and who –T c._news_time b.finger and who b. . To read the stale news the option available is a.msg –o c. /usr/aa12/mbox c.The message of the day is stored in a file called a.news. /etc/profile b.finger –I and who –t d.time d. The escape sequence \033[4m is used to a. All the above 60. a= b. a=’ls’ b. /usr/aa12/. a=’’ c. . Which stores the incoming mail b. mark them as bold c. underlying characters b.mbox 55. A null variable a can be created using a. c=’1972’ d. all the above 59. Which of the following assignments is illegal a. age=25 d. display them in reverse video d. Which of the following assignment is illegal a. b=’ls –l’ c. d=’who | grepaal’ 58.mailrc is the file a. a=”” d. Which is used to type the mail to be sent c. a=’cat file’ b. Which is invoked when the mail command is executed d. none of the above 57. Which permits you to customize the vi environment 56. The shell metacharacter $# represents .d. a=100 b=50 c. $1 would be set d. Total number of processes running in the background 61. On executing the command Shift $v a.a. Unset d. An interpreter b. Total number of files in the current directory c. The positional parameters would be shifted by 1 c. only 1 value . Total number of arguments supplied to the shell script b. The positional parameters would be shifted by the value of the variable v b. Shift b. None of the above 62. Total number of users who have logged in d. ls 65. On executing a statement set -3+1 a. A compiler c. An operating system d. When we are executing a shell script the shell acts as a. The positional parameters would not be shifted at all d. maximum 3 values b. $1 would be -3 b. Readonly c. To the statement read v1 v2 v3 we can supply a. Which of the following is NOT a shell keyword a. $1 would be – c. This command would result into an error 64. This command would result into an error 63. a=’expr $b * ($c + $d)’ d. a=’expr $b * $c’ c.**. A shell variable cannot start with a.*. (). *. The metacharacter $* represents a.+./. a=’expr $b \* \( $c + $d \)’ 70. An alphabet b.c.. Value of the variable * d.d.or + 69.c. (). + or – b.% or *. Number of parameters supplied at the command prompt b./. (). Which of the following statements is correct a. **. Which of the following is allowed in an arithmetic statement involving exprinstruction a. Parameters supplied at the command prompt c. a=expr $b + $c b.**. {} c. () d. All files in the current directory 67.* or /. any number of values 66.+. A special symbol other than an underscore d. [] b. None of the above . (). Both b and c above 68. Which of the following shows the correct hierarchy of arithmetic operations in shell a./. A number c. exactly 3 values d. A for loop c. A program d. 2 b.5 b. 2. -3.285 74. 1 b. The expression expr -2 % 7 evaluates to a. 0. Operates on largest numbers 75. 3 c. 0 73.5 d. The statement z=’expr 5/2’ would store in z a value a. The expression expr -7 % 2evaluates to a. 0 72. -2 c. 0 d.71. -1 c. Is most important b. An if statement b. The break statement is used to exit from a. Hierarchy decides which operator a. None of the above 76. Is fastest d. 2 d. Is used first c. Only once . An until loop ensures that the statement within the loop get executed a. Standard output file c. Neither input nor output file 78.b. Standard input file b. Both input and output file d.The command is used to compare the files is known as a. | . +n. +(m+1). +m.Which of the following keys is used to move the cursor to the end of the paragraph a.n 79.n b. } b.Which command is used to terminate a process a. None of the above 77. Do d. The cp command uses a. Not even once d. Ccp 81. Comp b. Haltsys c. Cmp c. Kill 80. Which option will be used with sort command to start sorting after the nth column of the (m+1)th field a. Atleast once c. –m. Cancel d.m+1 d. Shutdown b. { c.n c. Rmdir c. Rd b. wcinfile>newfile b. $ 82. Paste 86. S b. The command which transcribes the standard input to the standard output and also makes a copy of the same in a file is a.Which command is used to extract a specific columns from the file a. Which command sends the word count of the file infile to the newfile.Which command is used to remove a directory a.d. Tr c. Cut c.Which of the following keys is used to replace a dingle character with new text a. wcinfile . s c. C 85. Tee b. Cat b. r d. Grep d. wc<infile>newfile c. Grep 83. Dldir d. Sort d.newfile d. Rdir 84. a. wcinfile | newfile . In vi editor. All of the above 91.Which command will be used with vi editor to insert text to left of cursor? as bS ca di 90.Which command is used to remove the read permission of the file 'note' from both the group and others? a. a :pat b :pat c. $# . chmodgo+r note b. forward search is performed using the command. chmodgo+rw note c. chmod go-x note d.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] 89. chmod go-r. Which of the following special shell variables is used to process number of the last background job? a $! b. /pat d.87. 4-x note 88. The filed separator in cut command is specified with A.-4 93. mail C. -r option D. -i . -c B. Which option will be used with ps command to slow the entire command line of the process being run? A. -1 D.mesg 94. -f C. $0 d.more 95.Which of the following commands is used to identify the type of file by context? A. cat C. $* 92.Which of the following command addresses all users who are currently hooked on? A.-x option 96. -d option C. -4 B. write B.c. ls B. wall D. -a option B. file D.Which of the following options will be used to display number of blocks used by a file? A. C. cat B. -b C.lyrix 100. -t D. other has read permission only C.Which option will be used with touch command to change the access time? A.group has write permission only .Which command is used to display and create files? A. The second set of the three permissions (r-) indicates that A.-s 97. -a B. -d D.-h 98. owner has read permission only D. chmod -1 a+xprogs D. chmod -R a+xprogs B. vi C. group has read permission only B. chmod -R 222 progs C. ed D.chmod -x a+xprogs 99.Which command is used to make all files and sub-directories in the directory (progs) executable by all users? A. A 24. B 18. A 4. B 3. D 23. C 26. A 19. D 22. D 17. A 14. B 6. A 7. A 12. D 21. C 11. C 5. C 9. D 16. D 10. B 8. B 13. C 25. D 20.Answers 1. C 2. C . D 15. B 32. A 40. A 34. A & D 53. D 42. C 48. D 52. C 44. A & D 47. B 31.27. A 37. C 30. C 50. B 28. E 41. C 39. C 36. A 35. A & D 46. B 43. C 33. B . D 51. A 38. A 29. B 45. C 49. C 59. D 66. D 60. D 80. D 69. B 67.54. D 63. B 73. D 68. A 64. C 71. C 58. D 65. B 57. B 74. A 61. B 79. D 70. D 77. B 76. B . D 78. C 56. C 72. B 75. A 62. A 55. B 96. B 86. A 92. D 91. D 88. A 87. A 99. B 93.a . B 85.81. D 90. C 95. C 94. A 83. A 98. A 82. A 100. B 84. A 89. D 97.
Copyright © 2024 DOKUMEN.SITE Inc.