

MCQOPTIONS
Saved Bookmarks
This section includes 133 Mcqs, each offering curated multiple-choice questions to sharpen your Computer Science knowledge and support exam preparation. Choose a topic below to get started.
51. |
Which shell's wild-cards is used to match a single character? |
A. | * |
B. | ? |
C. | [ijk] |
D. | [!ijk] |
Answer» C. [ijk] | |
52. |
Which of the following commands is used to have a two-way communication with any person who is currently logged in? |
A. | |
B. | mesg |
C. | write |
D. | grep |
Answer» D. grep | |
53. |
Which of the following commands is used to remove files with confirmation prompt from the user file system which have neither been accessed nor modified i the last one year? |
A. | find -mtime +365 | rm |
B. | grep (/usr/*) - mtime + 365 | -ok rm |
C. | find -name - mtime + 365 / - ok rm |
D. | find /user/* \(-mtime + 365 - a - atime +365 \) - OK rm {} \; |
Answer» E. | |
54. |
The special shell variable $* is used |
A. | to exit status of ast command executed. |
B. | to process number of the current shell |
C. | to list the positional parameters |
D. | to name the command being executed |
Answer» D. to name the command being executed | |
55. |
Which of the following commands is used to save the output of the who command in a file named user.lst, as well as display it? |
A. | who | tee user.lst |
B. | who > user.lst |
C. | who >> user.lst |
D. | who < user.lste |
Answer» B. who > user.lst | |
56. |
Which of the following commands can be used to get information about yourself? |
A. | who am i |
B. | i /4 |
C. | pwd |
D. | which |
Answer» B. i /4 | |
57. |
You can append to a file instead of overwriting by using the |
A. | > symbols |
B. | >> symbols |
C. | < symbols |
D. | << symbols |
Answer» C. < symbols | |
58. |
Which of the following is invalid filename? |
A. | shutry |
B. | TRY |
C. | trial |
D. | my .file |
Answer» E. | |
59. |
The first set of the three permissions (rw) pertains to the owner of the file, indicating that the owner has |
A. | executable permission only |
B. | write and executable permissions |
C. | both read and executable permissions. |
D. | both read and write permissions |
Answer» E. | |
60. |
Which command will be used with vi editor to replace single character under cursor with any number of characters? |
A. | s |
B. | S |
C. | a |
D. | i |
Answer» B. S | |
61. |
Which command is used with vi editor to move the cursor to the left? |
A. | i |
B. | j |
C. | k |
D. | h |
Answer» E. | |
62. |
Which command is used with vi editor to move cursor forward to first occurrence of character 'ch' in the current line? |
A. | tch |
B. | fch |
C. | rch |
D. | ech |
Answer» C. rch | |
63. |
The command chmod 761 note is equivalent to |
A. | chmod 167 note |
B. | chmod u=rwx, g=rw, o=x note |
C. | chmo a =761 note |
D. | chmod 4=7, g=6,0 =1 note |
Answer» C. chmo a =761 note | |
64. |
Which command is used to terminate a process? |
A. | shutdown |
B. | haltsys |
C. | cancel |
D. | kill |
Answer» E. | |
65. |
Which command is used to list all the files with extension .lst? |
A. | ls -l *.lst |
B. | ls lst* |
C. | ls *.* |
D. | ls *[lst] |
Answer» B. ls lst* | |
66. |
Which command will be used with vi editor to replace text from cursor to right? |
A. | r |
B. | R |
C. | s |
D. | S |
Answer» C. s | |
67. |
Which of the following keys is used to replace a single character with new text? |
A. | S |
B. | s |
C. | r |
D. | C |
Answer» C. r | |
68. |
Which of the following commands is used to view your file 24 lines at a time? |
A. | pg |
B. | cat |
C. | lp |
D. | /p |
Answer» B. cat | |
69. |
Which command is used to save the standard output in a file, as well as display it on the terminal? |
A. | more |
B. | cat |
C. | grep |
D. | tee |
Answer» E. | |
70. |
The octal representation 652 indicates |
A. | Execute permission for the owner |
B. | Write permission for others |
C. | Read and write permission of groups |
D. | All of the above |
Answer» C. Read and write permission of groups | |
71. |
Which of the following files will displayed by this command cat *ch* |
A. | patch |
B. | catch |
C. | .ch |
D. | All of the above |
Answer» E. | |
72. |
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» B. other has read permission only | |
73. |
Which command is used with vi editor to save file and remain in the editing mode? |
A. | :q |
B. | :w |
C. | q! |
D. | :x |
Answer» C. q! | |
74. |
Which command is used to count just the number of characters in a file? |
A. | wc - 1 |
B. | wc -c |
C. | wc -w |
D. | wc -r |
Answer» C. wc -w | |
75. |
Which of the following commands is used to obtain a list of all files by modification time? |
A. | ls -1 |
B. | ls -t |
C. | ls -i |
D. | ls -R |
Answer» C. ls -i | |
76. |
Which of the following special shell variables is used to process number of the last background job? |
A. | $! |
B. | $# |
C. | $0 |
D. | $* |
Answer» B. $# | |
77. |
Which option will be used with sort command to start sorting ofter the nth column of the (m+l)th field? |
A. | #NAME? |
B. | #NAME? |
C. | #NAME? |
D. | +(m+l).n |
Answer» C. #NAME? | |
78. |
The Octal number to be given alogn with chmod command to make a file readable, writable and executable to the owner, readable and executable to group and others is: |
A. | 0 |
B. | 755 |
C. | 744 |
D. | 555 |
Answer» C. 744 | |
79. |
Which of the following commands is used to copy a file wb from the programs directory into a file called wbx in the misc directory? |
A. | copy programs/wb misc/wbx |
B. | cp programs/wb misc/wbx |
C. | tar programs/wb misc/wbx |
D. | copy a:programs/wb b:misc/wbx |
Answer» C. tar programs/wb misc/wbx | |
80. |
Which of the following options will be used to display number of blocks used by a file? |
A. | -c |
B. | #NAME? |
C. | #NAME? |
D. | #NAME? |
Answer» E. | |
81. |
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» B. tr | |
82. |
Which option will be used with touch command to change the access time? |
A. | #NAME? |
B. | #NAME? |
C. | #NAME? |
D. | #NAME? |
Answer» B. #NAME? | |
83. |
Which command is used to move all files to the bin sub-directory of the parent directory? |
A. | mv *.* /bin/ |
B. | mv * /bin/* |
C. | mv * ../bin |
D. | mv * ../bin *.* |
Answer» D. mv * ../bin *.* | |
84. |
Which of the following command addresses all users who are currently hooked on? |
A. | write |
B. | |
C. | wall |
D. | mesg |
Answer» D. mesg | |
85. |
The command to count the number of files in the current directory by using pipes, is |
A. | ls | wc |
B. | ls -l | wc -l |
C. | ls | wc -w |
D. | ls | ws -c |
Answer» D. ls | ws -c | |
86. |
The field separator in cut command is specified with |
A. | #NAME? |
B. | #NAME? |
C. | -r option |
D. | #NAME? |
Answer» C. -r option | |
87. |
Which column contains all details of the permissions of a file when you issue the ls -l command? |
A. | second |
B. | fourth |
C. | third |
D. | first |
Answer» E. | |
88. |
Which command is used to display the device name of the terminal you are using? |
A. | who |
B. | ls |
C. | tty |
D. | stty |
Answer» D. stty | |
89. |
The command used to remove the directory is; |
A. | rmdir |
B. | rd |
C. | remove |
D. | rdir |
Answer» B. rd | |
90. |
Which of the following command is used to count just the number of lines contained in a file? |
A. | wc -l |
B. | wc -c |
C. | wc -w |
D. | wc -r |
Answer» B. wc -c | |
91. |
Which of the following is not a filter? |
A. | cat |
B. | grep |
C. | wc |
D. | sort |
Answer» E. | |
92. |
Which of the following commands is used to display the filenames in multiple columns? |
A. | ls |
B. | ls -1 |
C. | ls -x |
D. | lc |
Answer» D. lc | |
93. |
Which of the following directories contain all the Alias created by a user, including his login directory? |
A. | /tmp |
B. | /etc |
C. | /usr |
D. | /dev |
Answer» D. /dev | |
94. |
The cp command uses: |
A. | standard input file |
B. | standard output file |
C. | both input and output file |
D. | neither standard input nor standard output file |
Answer» E. | |
95. |
While working with mail command, which command is used to save mail in a separate file? |
A. | s |
B. | r |
C. | w |
D. | d |
Answer» B. r | |
96. |
Which of the following commands is used to absolutely assign all permissions to the owner, read and write permissions to the group and only executable permission to the others of the file note? |
A. | chmod 761 note |
B. | chmod 671 note |
C. | chmod 167 note |
D. | chmod 4=rwx, g=rw note |
Answer» B. chmod 671 note | |
97. |
Which of the following is not a communication command. |
A. | write |
B. | mesg |
C. | |
D. | grep |
Answer» E. | |
98. |
If you are to use [Control-c] as the interrupt key instead of [Del], then you will have to use |
A. | tty ^c |
B. | stty intr \^c |
C. | stty echoe |
D. | stty echo \^a |
Answer» C. stty echoe | |
99. |
Which command is used to copy a file wb with the same name from the programs directory to the misc directory? |
A. | copy programs/wb misc/wb |
B. | cp programs/wb misc |
C. | tar programs/wb misc/wb |
D. | copy a:programs/wb b:misc/wb |
Answer» C. tar programs/wb misc/wb | |
100. |
Which command is used to assign only read permission to all three categories of the file 'note'? |
A. | chmod go+r note |
B. | chmod a-rw |
C. | chmod ugo=r note |
D. | chmod u+r,g+r,o-x note |
Answer» D. chmod u+r,g+r,o-x note | |