Explore topic-wise MCQs in Testing Subject.

This section includes 657 Mcqs, each offering curated multiple-choice questions to sharpen your Testing Subject knowledge and support exam preparation. Choose a topic below to get started.

1.

___ searches for a first instance of a pattern in forwarding direction

A. /
B. %
C. &
D. ?
Answer» B. %
2.

__ command allows us to undo a number of changes that have been made to a single line before moving away from that line.

A. u
B. U
C. dd
D. yy
Answer» C. dd
3.

To copy 10 lines from the current cursor location, we can use ____

A. 10y
B. 10yy
C. yy10
D. 10x
Answer» C. yy10
4.

To copy (yank) lines in vi editor, we use ______ command.

A. dd
B. x
C. p
D. yy
Answer» E.
5.

Which of the following commands of ex-mode is equivalent to ‘G’ command in command mode?

A. : .
B. : $
C. : %
D. :w
Answer» C. : %
6.

Which key is used for absolute movement?

A. f
B. G
C. M
D. ctrl-g
Answer» D. ctrl-g
7.

___ command moves the cursor to the end of next line.

A. 0
B. |
C. %
D. $
Answer» E.
8.

Using ‘w’ command we can _________

A. move back to the beginning of the word
B. move forward to the end of the word
C. move forward to the beginning of the word
D. move back to the end of the word
Answer» D. move back to the end of the word
9.

Using ‘b’ command we can _________

A. move back to the beginning of the word
B. move forward to the end of the word
C. move forward to the beginning of the word
D. move back to the end of the word
Answer» B. move forward to the end of the word
10.

Using ‘e’ command we can __________

A. move back to the beginning of the word
B. move forward to the end of the word
C. move forward to the beginning of the word
D. move back to the end of the word
Answer» C. move forward to the beginning of the word
11.

To recover from a crash, we can use ____ command.

A. :recover
B. -r
C. : x
D. :recover and -r
Answer» E.
12.

To return back to the editor from shell prompt we use _____ command.

A. fg
B. exit
C. back
D. fg and exit
Answer» E.
13.

In ex-mode, current line is represented by __

A. :
B. $
C. >
D. .
Answer» E.
14.

In ex-mode, last line is represented by _

A. :
B. $
C. >
D. .
Answer» B. $
15.

Which command is used to abort the editing and quit the editing mode?

A. :w
B. :wq
C. :q
D. ‘:x’
Answer» D. ‘:x’
16.

Which of the following command is a substitute for ‘:x’ command?

A. ‘:x’
B. :wq
C. :q
D. :w
Answer» C. :q
17.

Which one of the following is the best way for saving and quitting the editor?

A. ZZ
B. :wq
C. :w
D. ‘:x’
Answer» B. :wq
18.

Pressing ‘:’ in command mode invokes which mode of vi editor?

A. ex-mode
B. insert mode
C. command mode
D. input mode
Answer» B. insert mode
19.

To replace the entire line irrespective of cursor position, we can use ____ command

A. s
B. 10s
C. S
D. 10S
Answer» D. 10S
20.

To replace 5 characters with new characters, which one of the following will be used?

A. s
B. 5S
C. 5s
D. S
Answer» D. S
21.

To replace all text on the right of the cursor position, we use ____ command.

A. r
B. R
C. s
D. l
Answer» C. s
22.

Which one of the following command is used to replace a single character with many?

A. s
B. r
C. R
D. S
Answer» B. r
23.

Input mode is used for ______

A. editing text in files
B. invoking commands on files
C. saving files
D. performing substitution
Answer» B. invoking commands on files
24.

One of the most important features of vi editor is _____

A. available mostly across all UNIX platforms
B. easy to learn
C. latest editor
D. powerful than other editors
Answer» B. easy to learn
25.

The first UNIX editor was __

A. emacs
B. ex
C. ed
D. vi
Answer» D. vi
26.

While entering text in input mode the data is saved in ___

A. buffer
B. disk
C. RAM
D. cache
Answer» B. disk
27.

___ key is used for switching to command mode from input mode.

A. i
B. A
C. :
D. esc
Answer» E.
28.

Which one of the following key is used to switch from command mode to input mode?

A. i
B. :
C. esc
D. ;
Answer» B. :
29.

Which symbol is used to change permissions for hidden files?

A. .
B. &
C. $
D. *
Answer» B. &
30.

Like chmod, chown and chgrp can also use ___ option.

A. -R
B. -r
C. -x
D. -i
Answer» B. -r
31.

Which command is used to change the group owner of the file?

A. chown
B. ch
C. chgrp
D. chmod
Answer» D. chmod
32.

Which character is used to replace ‘ugo’ string in chmod command?

A. a
B. v
C. x
D. o
Answer» B. v
33.

To remove write permission from group and others, which one of the following commands will be used?

A. chmod go+w file01
B. chmod go-w file01
C. chmod ug-w file01
D. chmod a-w file01
Answer» C. chmod ug-w file01
34.

A file owner does not have a permission to edit the file but the group to which the file owner belong do have the permission to edit it. Can owner edit the file?

A. Yes
B. No
C. Cannot be defined
D. Error will be encountered
Answer» C. Cannot be defined
35.

The write permission for a directory determines that ______

A. we can write to a directory file
B. we can read the directory file
C. we can execute the directory file
D. we can add or remove files to it
Answer» E.
36.

A file contains 1026 bytes. How many bytes of disk space will it consume if size of a disk block is 1024 bytes?

A. 1026
B. 1024
C. 2048
D. 4096
Answer» D. 4096
37.

Which option is used with unzip command to view the contents of a compressed archive?

A. -v
B. -t
C. -c
D. -x
Answer» B. -t
38.

Which command is used for unzipping files which are compressed using zip command?

A. gunzip
B. gzip
C. unzip
D. guzip
Answer» D. guzip
39.

o create an archive named abc.tar consisting of two files, file01 and file02, which of the following command will be used?

A. tar –cvf abc.tar file01 file02
B. tar –cvf file01 file02 abc.tar
C. tar –cv abc.tar file01 file02
D. tar –c abc.tar file01 file02
Answer» C. tar –cv abc.tar file01 file02
40.

Which of the following is an archival program?

A. arch
B. archive
C. ar
D. tar
Answer» E.
41.

Which of the following key options is used with tar to create an archive?

A. -c
B. -x
C. -t
D. –f archive name
Answer» B. -x
42.

Which of the following is not an internal command for more?

A. q
B. f
C. b
D. z
Answer» E.
43.

UNIX offers a pager named ____ which has replaced the original pager of UNIX called ____

A. more, less
B. less, more
C. more, pg
D. pg, more
Answer» D. pg, more
44.

Which option is used for printing multiple copies of a file using lp command?

A. -l
B. -i
C. -t
D. -n
Answer» E.
45.

Which option is used with lp command if there are more than one printers in the system?

A. -t
B. -d
C. -i
D. -p
Answer» C. -i
46.

Which option is used for counting the number of characters in a file only.

A. -l
B. -w
C. -c
D. -w
Answer» D. -w
47.

Which command is used for printing a file?

A. lp
B. pr
C. pg
D. more
Answer» B. pr
48.

Which option is used for counting the number of words in a file only?

A. -l
B. -w
C. -c
D. -W
Answer» E.
49.

When two files are identical, what is the output of diff command?

A. Files are identical
B. Returns prompt
C. No output
D. Throws an error
Answer» C. No output
50.

Which command is used to display the differences between files?

A. comm
B. diff
C. cmp
D. differ
Answer» C. cmp