Chapter: Vim Editor and Basic Scripting • Total: 224 MCQs
MCQ 1Working with Vim Editor
Which of the following statement is true for Gedit?
AIt is a Command line editor.
BIt is a Graphical editor.
CIt is not an editor.
DIt is available with KDE Desktop environment.
Correct Answer: Option B
Note: Exercise
MCQ 2Saving the File
:wq in Vim editor is used for which of the following activities?
ATo save file and remain in editing mode
BTo save file and quit editing mode
CTo quite editing mode without saving changes made in the file
DAll of the above
Correct Answer: Option B
Note: Exercise
MCQ 3Working with Vim Editor
Which of following keys is not used to go into insert mode of the Vim editor?
Ao
Bi
Ca
Dcw
Correct Answer: Option D
Note: Exercise
MCQ 4Working with Vim Editor
Which of the following keys are used to delete a line?
Ace
Bge
Cdd
Dd$
Correct Answer: Option C
Note: Exercise
MCQ 5Working with Vim Editor
Which of the following syntax is used to substitute all occurrences of phrase1 with phrase2 in the entire file without asking for user confirmation?
A:%s/phrase1/phrase2/g
B:%s/phrase1/phrase2/gc
C:s/phrase1/phrase2/g
D:s/phrase1/phrase2/gc
Correct Answer: Option A
Note: Exercise
MCQ 6Working with Vim Editor
Which of the following character is used for commenting a line in a shell script?
A*
B%
C$
D#
Correct Answer: Option D
Note: Exercise
MCQ 7Working with Vim Editor
Which of the following symbol instructs a shell script to extract the value of a variable?
A*
B%
C$
D#
Correct Answer: Option C
Note: Exercise
MCQ 8Working with Vim Editor
Ubuntu Linux commands are executed ?????..
A one at a time.
B two at a time
C many at a time
D none of these
Correct Answer: Option A
MCQ 9Working with Vim Editor
In Ubuntu Linux multiple commands can be executed by using ?????
A pipes
B conditions
C filter
D all of these
Correct Answer: Option A
MCQ 10Working with Vim Editor
The process of executing multiple commands using pipes is ?????..
A smart work
B tedious
C perfect work
D none of these
Correct Answer: Option B
MCQ 11Working with Vim Editor
A better way of executing multiple commands at one go is to ?????..
A use pipe
B type the sequence of commands in a text file.
C use @ symbol
D both (A) and (B)
Correct Answer: Option B
MCQ 12Working with Vim Editor
After typing the sequence of commands in a text file, this text file should be given ?????. execution.
A kernel
B linux shell
C interpreter
D compiler
Correct Answer: Option B
MCQ 13Working with Vim Editor
The ?????.. will execute all the commands available within the text file in the specified sequence.
A kernel
B linux shell
C interpreter
D compiler
Correct Answer: Option B
MCQ 14Shell Script
______ assists us in writing the shell script .
A Terminal
B Application
C Editor
D Both (A) and (B)
Correct Answer: Option C
MCQ 15Working with Vim Editor
?????.. can be defined as series of commands written in a plain text file.
A Pipe
B Editor
C Shell script
D Kernel
Correct Answer: Option C
MCQ 16Shell Script
A shell script can be defined as ??????
A series of commands written in a plain text file.
B condition for commands written in a plain text file.
C excel file
D none of these
Correct Answer: Option A
MCQ 17Working with Vim Editor
The ?????? are commonly used by the users to perform routine individual tasks and system administration.
A pipe
B editor
C shell script
D kernel
Correct Answer: Option C
MCQ 18Working with Vim Editor
The shell scripts are commonly used by the ?????? to perform routine individual tasks and system administration.
A users
B designers
C analysts
D all of these
Correct Answer: Option A
MCQ 19Working with Vim Editor
The shell scripts are commonly used by the users to perform ??????. .
A creating users
B routine individual tasks
C system administration.
D both (B) and (C)
Correct Answer: Option D
MCQ 20Working with Vim Editor
????? command is used to create a file.
A Cat
B Man
C Echo
D Pwd
Correct Answer: Option A
MCQ 21Working with Vim Editor
What is the use of cat command ?
A Create a file
B Create directory
C Change directory
D None of these
Correct Answer: Option A
MCQ 22Working with Vim Editor
?????.. command is used to create a file.
A Cat
BVi
CVi filename
D All of these
Correct Answer: Option D
MCQ 23Working with Vim Editor
The cat command although it allows us to create a file is not a ??????.. option to use when creating a shell script.
A good
B worthy
C possible
D practical
Correct Answer: Option A
MCQ 24Working with Vim Editor
The ?????? command although it allows us to create a file is not a good option to use when creating a shell script.
A cat
B man
C echo
D pwd
Correct Answer: Option A
MCQ 25Working with Vim Editor
Which is the example of text editor ?
A Pico
B Nano
C Vi or vim
D All of these
Correct Answer: Option D
MCQ 26Working with Vim Editor
Which types of text editor available to serve the purpose of writing shell scripts ?
A vi & vim
B emacs, nano
C pico, ed
D All of these
Correct Answer: Option D
MCQ 27Working with Vim Editor
Which types of graphical editor available to serve the purpose of writing shell scripts ?
A Gedit
B Kwriter
C Both (A) and (B)
D None of these
Correct Answer: Option C
MCQ 28Working with Vim Editor
To execute a command, user types it on ??????? prompt and press the Enter key.
A command
B graphics
C (A) or (B)
D none of these
Correct Answer: Option A
MCQ 29Working with Vim Editor
In how many modes Vim editor works ?
A Four
B Three
C Two
D One
Correct Answer: Option B
MCQ 30Working with Vim Editor
In Linux, the output of the command is displayed on the ??????.
A editor
B graph
C screen
D shell script
Correct Answer: Option C
MCQ 31Working with Vim Editor
Which graphical editor is available with GNOME desktop environment ?
A Gedit
B Kwrite
C editG
D writeK
Correct Answer: Option A
MCQ 32Working with Vim Editor
Which desktop environment provides Gedit graphical editor ?
A KDE
B DEK
C NOMEG
D GNOME
Correct Answer: Option D
MCQ 33Working with Vim Editor
Which graphical editor is available with KDE desktop environment ?
A Gedit
B Kwrite
C editG
D writeK
Correct Answer: Option B
MCQ 34Working with Vim Editor
Which desktop environment provides Kwrite graphical editor ?
A KDE
B DEK
C NOMEG
D GNOME
Correct Answer: Option A
MCQ 35Working with Vim Editor
What is Full form of Vim ?
A Vi Improved
B Virtual Important Machine
C Vi Independent
D Very Improved
Correct Answer: Option A
MCQ 36Working with Vim Editor
Vim is written by whom ?
A Robert Williams
B Bram Moolenaar
C Brath Moolenaar
D Bram Molth
Correct Answer: Option B
MCQ 37Working with Vim Editor
When was Vim publicly released ?
A1992
B1994
C1995
D1991
Correct Answer: Option D
MCQ 38Working with Vim Editor
Vim is enhanced version of which editor distributed with most UNIX systems ?
A ed
B pico
C nano
D vi
Correct Answer: Option D
MCQ 39Working with Vim Editor
Which is a highly configurable text editor built to enable efficient text editing ?
A ed
B pico
C nano
D Vim
Correct Answer: Option D
MCQ 40Working with Vim Editor
Which editor can be used from both a command line interface and as a standalone in a graphical user interface. ?
A ed
B pico
C nano
D Vim
Correct Answer: Option D
MCQ 41Working with Vim Editor
From where can the Vim editor be used ?
A Command line interface
B As a standalone in a graphical user interface
C Kernel
D Both (A) and (B)
Correct Answer: Option D
MCQ 42Working with Vim Editor
Which editor is available with almost all Unix and Linux flavours ?
A edit
B pee
C nona
D Vim
Correct Answer: Option D
MCQ 43Working with Vim Editor
To work with the Vim editor, we will have to ??????. it first.
A initiate
B compile
C interprete
D none of these
Correct Answer: Option A
MCQ 44Working with Vim Editor
In how many ways can Vim editor be opened ?
A Two
B Three
C Four
D Five
Correct Answer: Option A
MCQ 45Working with Vim Editor
Which method is used to open Vim editor ?
A Type vi at the prompt and press Enter key.
B Type vi followed by a file name and press Enter key.
C Type filename and press Enter key
D Both (A) and (B)
Correct Answer: Option D
MCQ 46Working with Vim Editor
When a new file is opened in Vim it is filled with ??????? tildes (~) on the left side of the screen.
A @
B #
C ~(tilde)
D $
Correct Answer: Option C
MCQ 47Working with Vim Editor
When a new file is opened in Vim ??????. symbol indicates that the lines are yet to be used by the editor.
A @
B #
C ~(tilde)
D $
Correct Answer: Option C
MCQ 48Working with Vim Editor
When a new file is opened in Vim the ?????. appears in the top left corner of the screen.
A $
B command line
C @
D cursor
Correct Answer: Option D
MCQ 49Working with Vim Editor
When a new file is opened in Vim the cursor appears in the top ?????.. of the screen.
A left corner
B center
C right corner
D none of these
Correct Answer: Option A
MCQ 50Working with Vim Editor
On the which line is some text visible when a new file is opened in Vim ?
A Last
B First
C Fifth
D Seventh
Correct Answer: Option A
MCQ 51Working with Vim Editor
What is the last line of a new file opened in Vim known as ?
A Command line
B Command prompt
C Shell
D None of these
Correct Answer: Option A
MCQ 52Working with Vim Editor
Which line is known as command line when a new file is opened in Vim ?
A Last
B First
C Fifth
D Seventh
Correct Answer: Option A
MCQ 53Working with Vim Editor
Where is the name of the file along with the information about the total number of lines and columns within the file displayed ?
A Command line
B Command prompt
C Shell
D None of these
Correct Answer: Option A
MCQ 54Working with Vim Editor
What is displayed on the command line ?
A The name of the file
B The name of the file along with the information about the total number of lines
C The name of the file along with the information about the total number of lines and columns within the file
D None of these
Correct Answer: Option C
MCQ 55Working with Vim Editor
How many modes are there in Vim editor ?
A Three
B Two
C Four
D One
Correct Answer: Option A
MCQ 56Working with Vim Editor
Which are the modes available in Vim editor ?
A Command
B Insert
C Last line
D All of these
Correct Answer: Option D
MCQ 57Working with Vim Editor
In which mode will the editor be opened, when we first start editing a file using the Vim editor ?
A(D) All of these
B Insert
C Last line
D All of these
Correct Answer: Option A
MCQ 58Working with Vim Editor
By default the Vim editor will start in which mode ?
A Command
B Insert
C Last line
D All of these
Correct Answer: Option A
MCQ 59Working with Vim Editor
What can we do immediately after being in command mode ?
A We can?t insert text
B We can insert text
C We can delete text
D None of these
Correct Answer: Option A
MCQ 60Working with Vim Editor
Which command is to be issued to insert the text in the file ?
A Insert (i)
B Append (a)
C Open (o)
D Any of these
Correct Answer: Option D
MCQ 61Working with Vim Editor
Which command is to be issued to be in the insert mode of Vim editor ?
A Insert (i)
B Append (a)
C Open (o)
D Any of these
Correct Answer: Option D
MCQ 62Working with Vim Editor
What is an extension to the command mode known as ?
A Visual mode
B Insert
C Last line
D None of these
Correct Answer: Option A
MCQ 63Working with Vim Editor
Which mode is a flexible and easy way to select a piece of text from the file ?
A Visual mode
B Insert
C Last line
D None of these
Correct Answer: Option A
MCQ 64Working with Vim Editor
Which mode is the only way to select a block of text that needs to be modified ?
A Visual mode
B Insert
C Last line
D None of these
Correct Answer: Option A
MCQ 65Working with Vim Editor
Visual mode is ?????..
A is a flexible and easy way to select a piece of text from the file
B is the only way to select a block of text that needs to be modified.
C is an extension to the command mode
D all of these
Correct Answer: Option D
MCQ 66Working with Vim Editor
Visual mode ??????
A is a flexible and easy way to select a piece of text from the file
B is the only way to select a block of text that needs to be modified.
C is the most difficult mode
D both (A) and (B)
Correct Answer: Option D
MCQ 67Working with Vim Editor
Which character switches to the visual mode allowing to manipulate characters ?
A v
B V
C CTRL + v
D d
Correct Answer: Option A
MCQ 68Working with Vim Editor
Which character switches to the visual mode allowing to manipulate lines ?
A v
B V
C CTRL + v
D d
Correct Answer: Option B
MCQ 69Working with Vim Editor
Which character switches to block visual mode allowing to manipulate rectangular blocks of text ?
A v
B V
C CTRL + v
D d
Correct Answer: Option C
MCQ 70Working with Vim Editor
What can be done in insert mode ?
A We can type text in file
B Navigate within the file
C None of these
D Both (A) and (B)
Correct Answer: Option D
MCQ 71Working with Vim Editor
How can we toggle between the command mode and the insert mode ?
A By pressing the SHIFT key
B By pressing the ESC key
C By pressing the TAB key
D By pressing the CTRL key
Correct Answer: Option B
MCQ 72Working with Vim Editor
Which command is used to insert text after the current cursor position ?
A a
B i
C A
D I
Correct Answer: Option A
MCQ 73Working with Vim Editor
Which command is used to insert text before the current cursor position ?
A a
B i
C A
D I
Correct Answer: Option A
MCQ 74Working with Vim Editor
Which command is used to append text after at the end of the current line ?
A a
B i
C A
D I
Correct Answer: Option C
MCQ 75Working with Vim Editor
Which command is used to insert text from the beginning of a line ?
A a
B i
C A
D I
Correct Answer: Option D
MCQ 76Working with Vim Editor
Which command is used to insert a new line above the current cursor position ?
A O
B o
C A
D I
Correct Answer: Option A
MCQ 77Working with Vim Editor
Which command is used to insert a new line below the current cursor position ?
A O
B o
C A
D I
Correct Answer: Option B
MCQ 78Working with Vim Editor
To perform which operation normally is the last line mode used for ? To perform operations like quitting the Vim session or saving a file.
A Quitting the Vim session
B Saving a file
C Type the text
D Both (A) and (B)
Correct Answer: Option D
MCQ 79Working with Vim Editor
Which mode is normally used to perform operations like quitting the Vim session or saving a file ?
A Visual mode
B Insert
C Last line
D None of these
Correct Answer: Option C
MCQ 80Working with Vim Editor
To go to the last line mode we first need to be in which mode ?
A Command mode
B Insert
C Last line
D None of these
Correct Answer: Option A
MCQ 81Working with Vim Editor
By pressing which key can we go from command mode to the last line mode ?
A Colon(:)
B ESC
C TAB
D $
Correct Answer: Option A
MCQ 82Working with Vim Editor
After pressing the colon(:) key, a colon character is seen at the beginning of the last line of Vim editor window with cursor blinking near it. What does this indicate ?
A The editor is ready for accepting a ?last line command?
B The editor is ready to type the text
C The editor is ready to edit the text
D The editor is ready to delete the text
Correct Answer: Option A
MCQ 83Working with Vim Editor
What is seen on the last line of Vim editor window after pressing the colon(:) key ?
A A colon character is seen at the beginning of the last line of Vim editor window.
B A colon character is seen at the beginning of the last line of Vim editor window with cursor blinking near it.
C A $ prompt is seen at the beginning of the last line of Vim editor window with cursor blinking near it.
D a $ prompt is seen at the beginning of the last line of Vim editor window.
Correct Answer: Option B
MCQ 84Working with Vim Editor
By pressing which key twice can we toggle back to the command mode from the last line mode ?
A Colon(:)
B ESC
C TAB
D $
Correct Answer: Option B
MCQ 85Working with Vim Editor
How can we toggle back to the command mode from the last line mode ?
A By pressing the ESC key twice
B By pressing the [Backspace] key until the initial character is gone along with all the characters that we had typed
C By pressing the TAB key twice
D Both (A) and (B)
Correct Answer: Option D
MCQ 86Working with Vim Editor
Which method is used to create a file in Vim editor ?
A Type vi followed by a file name and press Enter key
B Type vi at the prompt and press Enter key
C Cat filename
D Both (A) and (B)
Correct Answer: Option D
MCQ 87Working with Vim Editor
Which command is used to create a file in Vim editor ?
A $vi filename
B $vi
C Scat filename
D Both (A) and (B)
Correct Answer: Option D
MCQ 88Working with Vim Editor
Which command is used to get into insert mode ?
A a
B i
C s
D Both (A) and (B)
Correct Answer: Option D
MCQ 89Working with Vim Editor
Which command is used to save a file in Vim editor ?
A :wq
B :s
C :fs
D :xy
Correct Answer: Option A
MCQ 90Working with Vim Editor
To which mode do we need to switch to form the insert mode to save a file in Vim editor ?
A Last line
B Execute
C Delete
D Modify
Correct Answer: Option A
MCQ 91Working with Vim Editor
Which command is used to save a file and remain in editing mode in Vim editor ?
A :w
B :wq
C :q
D :q!
Correct Answer: Option A
MCQ 92Working with Vim Editor
Which command is used to save a file and quit editing mode in Vim editor ?
A ??
B :wq
C :q
D Both (A) and (B)
Correct Answer: Option D
MCQ 93Working with Vim Editor
Which command is used to quit editing mode when no changes are made in the file in Vim editor ?
A :w
B :wq
C :q
D :q!
Correct Answer: Option C
MCQ 94Working with Vim Editor
Which command is used to quit editing mode without saving changes made in the file in Vim editor ?
A :w
B :wq
C :q
D :q!
Correct Answer: Option D
MCQ 95Working with Vim Editor
Which command is used to save existing file with new name and continue editing it under the new file name in Vim editor ?
A :w
B :wq
C :q
D :saveas Filename
Correct Answer: Option D
MCQ 96Working with Vim Editor
When Vim editor is opened without typing file name initially, the text will be directly stored in the ??????.
A system buffer
B hard disk
C register
D bus
Correct Answer: Option A
MCQ 97Working with Vim Editor
When Vim editor is opened without typing file name initially, the text will be directly stored in the ??????
A main memory
B hard disk
C register
D bus
Correct Answer: Option A
MCQ 98Working with Vim Editor
The arrow keys are used to move the ??????. in up,down,left and right direction.
A cursor
B window
C screen
D none of these
Correct Answer: Option A
MCQ 99Working with Vim Editor
The arrow keys are used to move the cursor in ?????. direction.
A up and down
B left and right
C digonally
D both (A) and (B)
Correct Answer: Option D
MCQ 100Working with Vim Editor
In file in Vim editor which command moves cursor to left ?
A h
B l
C j
D k
Correct Answer: Option A
MCQ 101Working with Vim Editor
In file in Vim editor which command moves cursor to right ?
A h
B l
C j
D k
Correct Answer: Option B
MCQ 102Working with Vim Editor
In file in Vim editor which command moves cursor to down ?
A h
B l
C j
D k
Correct Answer: Option C
MCQ 103Working with Vim Editor
In file in Vim editor which command moves cursor to up ?
A h
B l
C j
D k
Correct Answer: Option D
MCQ 104Working with Vim Editor
In file in Vim editor which command moves cursor to right one space ?
A spacebar
B l
C j
D k
Correct Answer: Option A
MCQ 105Working with Vim Editor
In Vim editor which command moves cursor down in first column ?
A ?
B +
C *
D /
Correct Answer: Option A
MCQ 106Working with Vim Editor
In Vim editor which command moves cursor up in first column ?
A ?
B +
C *
D /
Correct Answer: Option B
MCQ 107Working with Vim Editor
In Vim editor which command scrolls down one half of a page ?
A CTRL + d
B CTRL + u
C CTRL + f
D CTRL + b
Correct Answer: Option A
MCQ 108Working with Vim Editor
In Vim editor which command scrolls up one half of a page ?
A CTRL + d
B CTRL + u
C CTRL + f
D CTRL + b
Correct Answer: Option B
MCQ 109Working with Vim Editor
In Vim editor which command scrolls forward one page ?
A CTRL + d
B CTRL + u
C CTRL + f
D CTRL + b
Correct Answer: Option C
MCQ 110Working with Vim Editor
In Vim editor which command scrolls back one page ?
A CTRL + d
B CTRL + u
C CTRL + f
D CTRL + b
Correct Answer: Option D
MCQ 111Working with Vim Editor
In Vim editor which command moves the cursor to the middle of the page ?
A M
B H
C L
D $
Correct Answer: Option A
MCQ 112Working with Vim Editor
In Vim editor which command moves the cursor to the top of the page ?
A M
B H
C L
D $
Correct Answer: Option B
MCQ 113Working with Vim Editor
In Vim editor which command moves the cursor to the bottom of the page ?
A M
B H
C L
D $
Correct Answer: Option C
MCQ 114Working with Vim Editor
In Vim editor which command moves the cursor to the end of line ?
A M
B H
C L
D $
Correct Answer: Option D
MCQ 115Working with Vim Editor
In Vim editor which command moves the cursor to the beginmng of next sentence?
A )
B (
C G
D W
Correct Answer: Option A
MCQ 116Working with Vim Editor
In Vim editor which command moves the cursor to the beginmng of current sentence?
A )
B (
C G
D W
Correct Answer: Option B
MCQ 117Working with Vim Editor
In Vim editor which command moves the cursor to end of file ?
A )
B (
C G
D W
Correct Answer: Option C
MCQ 118Working with Vim Editor
In Vim editor which command moves the cursor one word at a time?
A )
B (
C G
D W
Correct Answer: Option D
MCQ 119Working with Vim Editor
In Vim editor which command moves the cursor back a word at a time.?
A Nb
B e
C c
D B
Correct Answer: Option D
MCQ 120Working with Vim Editor
In Vim editor which command moves the cursor back a word at a time ?
A Nb
B e
C b
D c
Correct Answer: Option C
MCQ 121Working with Vim Editor
In Vim editor which command moves the cursor back a word at a time ?
A b
B B
C e
D Both (A) and (B)
Correct Answer: Option D
MCQ 122Working with Vim Editor
In Vim editor which command moves the cursor back by N number of words ?
A Nb
B e
C b
D B
Correct Answer: Option A
MCQ 123Working with Vim Editor
In Vim editor which command moves the cursor back to end of word ?
A Nb
B E
C b
D B
Correct Answer: Option B
MCQ 124Working with Vim Editor
In Vim editor which command moves to first line of file ?
A Nb
B gg
C b
D B
Correct Answer: Option B
MCQ 125Working with Vim Editor
In Vim editor which command moves to the beginning of the line ?
A Nb
B gg
C b
D0
Correct Answer: Option D
MCQ 126Editing the Document
??????.. the document is one of the most common operations that a user would perform once the document is created.
A Skipping
B Editing
C Compiling
D Inserting
Correct Answer: Option B
MCQ 127Vim Modes
A user needs to toggle between the ?????? and the ?????? mode when we edit a document.
A command, insert
B edit, delete
C command, last line
D Insert, delete
Correct Answer: Option A
MCQ 128Working with Vim Editor
In Vim editor which command is used to undo last change ?
A U
B u
C C
D dd
Correct Answer: Option B
MCQ 129Working with Vim Editor
In Vim editor which command is used to undo all changes to entire line ?
A U
B u
C C
D dd
Correct Answer: Option A
MCQ 130Working with Vim Editor
In Vim editor which command is used to Delete single line ?
A U
B u
C C
D dd
Correct Answer: Option D
MCQ 131Working with Vim Editor
In Vim editor which command is used to delete N number of lines ?
A U
B u
C C
D Ndd
Correct Answer: Option D
MCQ 132Working with Vim Editor
In Vim editor which command is used to delete contents of line after cursor ?
A D
B dd
C C
D Ndd
Correct Answer: Option A
MCQ 133Working with Vim Editor
In Vim editor which command is used to delete contents of line after cursor and insert new text ?
A D
B dd
C C
D Ndd
Correct Answer: Option C
MCQ 134Working with Vim Editor
In Vim editor which command is used to delete one word ?
A cw
B Ndw
C dw
D Ndd
Correct Answer: Option C
MCQ 135Working with Vim Editor
In Vim editor which command is used to delete N number of words ?
A cw
B Ndw
C dw
D Ndd
Correct Answer: Option B
MCQ 136Working with Vim Editor
In Vim editor which command is used to change word ?
A cw
B Ndw
C dw
D Ndd
Correct Answer: Option A
MCQ 137Working with Vim Editor
In Vim editor which command is used to delete the character under the cursor ?
A R
B r
C x
D X
Correct Answer: Option C
MCQ 138Working with Vim Editor
In Vim editor which command is used to delete the character before the cursor ?
A R
B r
C x
D X
Correct Answer: Option D
MCQ 139Working with Vim Editor
In Vim editor which command is used to replace single character ?
A R
B r
C x
D X
Correct Answer: Option B
MCQ 140Working with Vim Editor
In Vim editor which command is used to overwrite characters from cursor onward ?
A R
B r
C x
D X
Correct Answer: Option A
MCQ 141Working with Vim Editor
In Vim editor which command is used to overwrite substitute one character under cursor and continue to insert ?
A s
B S
C x
D X
Correct Answer: Option A
MCQ 142Working with Vim Editor
In Vim editor which command is used to overwrite substitute entire line and begin to insert at beginning of line ?
A s
B S
C x
D X
Correct Answer: Option B
MCQ 143Working with Vim Editor
In Vim editor which command is used to change case of individual character ?
A . (dot)
B ~
C @
D %
Correct Answer: Option B
MCQ 144Working with Vim Editor
In Vim editor which command is used to repeat last command action ?
A . (dot)
B ~
C @
D %
Correct Answer: Option A
MCQ 145Working with Vim Editor
Vim editor allows to copy text ?????
A from file into temporary buffer
B from temporary buffer into file
C from file into processor
D both (A) and (B)
Correct Answer: Option D
MCQ 146Working with Vim Editor
Buffer which acts like temporary memory is known as ????..
A clipboard
B hard disk
C smart memory
D pen drive
Correct Answer: Option A
MCQ 147Working with Vim Editor
In Vim editor which command is used to place (paste) contents of buffer after current line defined by current cursor position ?
A p
B yy
C Nyy
D x
Correct Answer: Option A
MCQ 148Working with Vim Editor
In Vim editor which command is used to copy N lines from current cursor position into the buffer ?
A p
B yy
C Nyy
D x
Correct Answer: Option C
MCQ 149Working with Vim Editor
In Vim editor which command is used to copy single line from current cursor position into the buffer ?
A p
B yy
C Nyy
D Yy
Correct Answer: Option D
MCQ 150Working with Vim Editor
In Vim editor which command is used copy single line (defined by current cursor position) into the buffer ?
A p
B yy
C Nyy
D x
Correct Answer: Option B
MCQ 151Working with Vim Editor
The Vim editor allows to ?????..
A search text or a regular expression within the file
B substitution of a word in place of another word
C none of these
D both (A) and (B)
Correct Answer: Option D
MCQ 152Working with Vim Editor
In Vim editor which command is used to search for text in a forward direction ?
A /
B ?
C n
D SHIFT + n
Correct Answer: Option A
MCQ 153Working with Vim Editor
In Vim editor which command is used to search for text in a backward direction ?
A /
B ?
C n
D SHIFT + n
Correct Answer: Option B
MCQ 154Working with Vim Editor
In Vim editor which command is used to search again in the same direction ?
A /
B ?
C n
D SHIFT + n
Correct Answer: Option C
MCQ 155Working with Vim Editor
In Vim editor which command is used to search again in the opposite direction ?
A /
B ?
C n
D SHIFT + n
Correct Answer: Option D
MCQ 156Working with Vim Editor
Which of the following syntax is used to substitute all occurrences of phrase 1 with phrase2 in the entire file ?
A :%s/phrasel/phrase2/g
B :%s/phrasel/phrase2/gc
C :s/phrasel/phrase2/g
D :s/phrasel/phrase2/gc
Correct Answer: Option A
MCQ 157Working with Vim Editor
Which of the following syntax is used to substitute all occurrences of phrase 1 with phrase2 in the current line ?
A :%s/phrasel/phrase2/g
B :%s/phrasel/phrase2/gc
C :s/phrasel/phrase2/g
D :s/phrasel/phrase2/gc
Correct Answer: Option C
MCQ 158Working with Vim Editor
Which of the following syntax is used to substitute first occurrence of phrase1 with phrase2 in the current line ?
A :%s/phrasel/phrase2/g
B :s/phrasel/phrase2
C :s/phrasel/phrase2/g
D :s/phrasel/phrase2/gc
Correct Answer: Option B
MCQ 159Working with Vim Editor
To execute the Linux commands from within the Vim editor type ?????.. symbol before the command.
A %
B ! (exclamation)
C ?
D #
Correct Answer: Option B
MCQ 160Working with Vim Editor
What allows us to execute more than one command at one go in a better way ?
A Shell script
B Variable
C For loop
D Block
Correct Answer: Option A
MCQ 161Working with Vim Editor
What is defined as ?Set of commands written in plain text file that performs a designated task in a controlled order.? ?
A Shell script
B Variable
C Comment
D Block
Correct Answer: Option A
MCQ 162Working with Vim Editor
Shell script can be defined as ??????
A set of commands written in plain text file that performs a designated task in a controlled order.
B a word which is defined to perform certain action.
C memory location which has name
D none of these
Correct Answer: Option A
MCQ 163Working with Vim Editor
Is it necessary to provide sh as extension to shell script ?
A Yes, it is compulsory to provide sh extension to shell script
B No, it is not compulsory to provide sh extension to shell script
C No, it is not compulsory, it is good practice to provide sh extension to shell script
D None of these
Correct Answer: Option C
MCQ 164Shell Script
A comment in Ubuntu Linux is begins with which symbol ?
A #
B ?
C $
D @
Correct Answer: Option A
MCQ 165Shell Script
?????. in the script is not executed; they are messages that help user understand the usage or meaning of the script.
A Shell script
B Variable
C Comment
D Block
Correct Answer: Option C
MCQ 166Shell Script
?????. in the script is not executed.
A Shell script
B Variable
C Comment
D Block
Correct Answer: Option C
MCQ 167Working with Vim Editor
Which command clears the screen contents before giving the output of the script ?
A Echo
B Clear
C Cut
D Clean
Correct Answer: Option B
MCQ 168Working with Vim Editor
Which command displays a message on the screen ?
A Echo
B Ego
C Disp
D Display
Correct Answer: Option A
MCQ 169Working with Vim Editor
Which command gives the name and some additional details of the user currently logged into the system ?
A who am i
B who
C pwd
D cal
Correct Answer: Option A
MCQ 170Working with Vim Editor
Which command is used to execute the script use sh or bash command?
A sh
B bash
C ksh
D Both (A) and (B)
Correct Answer: Option D
MCQ 171Working with Vim Editor
Which command is used to set the desired privileges ?
A Chmod
B Changem
C Chmode
D Chprivilege
Correct Answer: Option A
MCQ 172Working with Vim Editor
Which command is used to make file executable ? (Consider name of file to be scriptl.sh)
A Chmod +x scriptl.sh
B Changem +x scriptl.sh
C Chmode +x scriptl.sh
D Chprivilege +x scriptl.sh
Correct Answer: Option A
MCQ 173Working with Vim Editor
For a script to be executed it needs to have ?????.. permission.
A execute
B read
C write
D all of these
Correct Answer: Option A
MCQ 174Working with Vim Editor
Which command is called a filter command?
A Who
B Clear
C Echo
D Cut
Correct Answer: Option D
MCQ 175Working with Vim Editor
Two command can be joined using which symbol ?
A | (pipe)
B # (hash)
C @ (at the rate)
D % (percentage)
Correct Answer: Option A
MCQ 176Working with Vim Editor
To make sure that the contents within the double quotes after the echo command are not treated as message we enclose them in ??????
A single quotes
B double quotes
C # (hash)
D back quotes ( ? ? )
Correct Answer: Option D
MCQ 177Working with Vim Editor
Which command is used to display date on the screen ?
A Date
B Datetime
C Cal
D Cd
Correct Answer: Option A
MCQ 178Working with Vim Editor
The back quotes are printed on the key with ?????? sign on the keyboard.
A ~ (tilde)
B single quotes
C @(at the rate)
D % (percentage)
Correct Answer: Option A
MCQ 179Working with Vim Editor
What is used to create a new command using multiple set of commands in Ubuntu Linux ?
A Shell Script
B For loop
C If condition
D While loop
Correct Answer: Option A
MCQ 180Working with Vim Editor
What is used for automating many aspects of computer maintenance, for example create 1 accounts; delete all size 0 files, installation of new software etc in Ubuntu Linux ?
A Shell Script
B Shell environment variables
C Shell Constants
D Shell Variables
Correct Answer: Option A
MCQ 181Working with Vim Editor
Can Shell Script be used for data backup in Ubuntu Linux ?
A Yes
B No
C None of these
D All of these
Correct Answer: Option A
MCQ 182Working with Vim Editor
Which is a very powerful tool of Linux ?
A Shell Script
B Shell environment variables
C Shell Constants
D Shell Variables
Correct Answer: Option A
MCQ 183Working with Vim Editor
Who has almost all the capabilities of any higher level programming language in Linux ?
A Shell Script
B Shell arithmatic
C Shell Constants
D Functions
Correct Answer: Option A
MCQ 184Working with Vim Editor
Which task should be done using the shell scripts ?
A Repetitive
B Non Repetitive
C Sequential
D Non ? Sequential
Correct Answer: Option A
MCQ 185Working with Vim Editor
Which type of values can be assigned to a variable ?
A Strings
B Numeric
C Shell script
D Both (A) and (B)
Correct Answer: Option D
MCQ 186Working with Vim Editor
What is the full form of expr ?
A Exception
B Expresso
C Express
D Expression
Correct Answer: Option D
MCQ 187Working with Vim Editor
What are the contents written after expr are assumed to be ?
A Operands of an expression
B Operators of an expression
C Boolean expression
D Both (A) and (B)
Correct Answer: Option D
MCQ 188Working with Vim Editor
While writing a numerical expression in Linux should there be one space between operator and operands ?
A Yes
B No
C None of these
D All of these
Correct Answer: Option A
MCQ 189Working with Vim Editor
While writing a numerical expression in Linux should there be no space between operator and operands ?
A Yes
B No
C None of these
D All of these
Correct Answer: Option B
MCQ 190Working with Vim Editor
While writing a numerical expression in Linux should there be no space before and after the assignment operator (=) ?
A Yes
B No
C None of these
D All of these
Correct Answer: Option A
MCQ 191Working with Vim Editor
While writing a numerical expression in Linux should there be one space before and after the assignment operator (=) ?
A Yes
B No
C None of these
D All of these
Correct Answer: Option B
MCQ 192Working with Vim Editor
Which operator is used for addition in Linux?
A +
B ++
C =+
D All of these
Correct Answer: Option A
MCQ 193Working with Vim Editor
WTiich operator is used for subtraction in Linux ?
A ?
B % ?
C = ?
D All of these
Correct Answer: Option A
MCQ 194Working with Vim Editor
Which operator is used for multiplication in Linux ?
A *
B **
C =*
D All of these
Correct Answer: Option A
MCQ 195Working with Vim Editor
Which operator is used for division in Linux ?
A /
B \
C = \
D All of these
Correct Answer: Option A
MCQ 196Working with Vim Editor
Which operator is used for modular division in Linux ?
A /
B \
C %
D All of these
Correct Answer: Option C
MCQ 197Working with Vim Editor
The numerical expressions are evaluated as per the general norms of ?????..
A mathematics
B science
C commerce
D none of these
Correct Answer: Option A
MCQ 198Working with Vim Editor
In case of tie between operators of same priority, preference is given to the operator which occurs ?????
A last
B third
C second
D first
Correct Answer: Option D
MCQ 199Working with Vim Editor
To force one operation to be performed earlier than the other, we can enclose the operation in ?????..
A curly braces
B rectuangular brackets
C parenthesis
D angular brackets
Correct Answer: Option C
MCQ 200Working with Vim Editor
Which operator in Linux has to be prefixed with \ (backslash) character ?
A +
B ?
C *
D %
Correct Answer: Option C
MCQ 201Working with Vim Editor
Multiplication operator has to be prefixed using ?. character .
A \ (forward slash)
B \ (backslash)
C %
D .(underscore)
Correct Answer: Option B
MCQ 202Working with Vim Editor
Why should * be prefixed by \ (backslash) character in Linux ?
A Otherwise the shell will treat the (*) symbol as a wildcard character.
B Otherwise the shell will treat the (*) symbol as a evaluating character.
C Otherwise the shell will treat the (*) symbol as a first operation to be performed.
D Otherwise the shell will treat the (*) symbol as a last operation to be performed.
Correct Answer: Option A
MCQ 203Working with Vim Editor
Which option of tr command is used to squeeze multiple spaces of output to single space ?
A -a
B -c
C -d
D -s
Correct Answer: Option A
MCQ 204Working with Vim Editor
Which column of date command displays ? year ?
A3
B4
C5
D6
Correct Answer: Option D
MCQ 205Working with Vim Editor
Which command is used to display the year from date command ?
A date | tr -s ? ? | cut -d ? ? -f 6
B date | tr -s ? ? | cut -d ? ? -f 4
C date | tr -s ? ? | cut -d ? ? -f 5
D date | tr -s ? ? | cut -d ? ? -f 3
Correct Answer: Option A
MCQ 206Working with Vim Editor
Which command is used to assign value to variables defined in the shell script ?
A Read
B Echo
C Clear
D None of these
Correct Answer: Option A
MCQ 207Working with Vim Editor
Which command expects the user to key in the data on the standard input device ?
A Read
B Echo
C Clear
D None of these
Correct Answer: Option A
MCQ 208Working with Vim Editor
In case we press Enter key without typing anything the script will assign ?????? value to the variable
A ELEVEN
B ONE
C ZERO
D NULL
Correct Answer: Option D
MCQ 209Working with Vim Editor
Which option instructs the echo command not to print a new line after the message is displayed ?
A -o
B -s
C -n
D -d
Correct Answer: Option C
MCQ 210Working with Vim Editor
What is the default action of the echo command after displaying the message passed to it as an argument ?
A Does not insert a new line
B Inserts a new line
C Inserts a null character
D Inserts zero
Correct Answer: Option B
MCQ 211Working with Vim Editor
Which command is used to display the total number of lines in that file ?
A Filename | wc -l
B Filename | wc
C Filename | wc -w
D Filename | wc -c
Correct Answer: Option A
MCQ 212Shell Script Variables
A variable name can consist of ?????.
A alphabets
B digitsr
C an underscore ( _ )
D all of these
Correct Answer: Option D
MCQ 213Working with Vim Editor
Which special character is allowed as part of variable name ?
A Backslash
B Percentage
C Dollar
D Underscore
Correct Answer: Option D
MCQ 214Working with Vim Editor
The first character of a variable name must be ?????. .
A an alphabet
B an underscore
C a dollar
D both (A) and (B)
Correct Answer: Option D
MCQ 215Working with Vim Editor
If the shell is unable to understand a word as a variable it will interpret it as a Linux ?????.
A command
B expression
C environment variable
D none of these
Correct Answer: Option A
MCQ 216Shell Script Variables
?????. are entities wherein we can store or edit a value in Linux.
A Variables
B Shell script
C Shell arithmatic
D None of these
Correct Answer: Option A
MCQ 217Working with Vim Editor
The value stored in the variable can also be ???????.. as per users need.
A reused
B changed
C none of these
D both (A) and (B)
Correct Answer: Option D
MCQ 218Shell Script Variables
A variable when used in a shell script allows us to ?????.
A Assign a value to it
B Accept its value from the user
C none of these
D both (A) and (B)
Correct Answer: Option D
MCQ 219Working with Vim Editor
Which command is used to display the value assigned to the variable ?
A Display
B Read
C Clear
D Echo
Correct Answer: Option D
MCQ 220Working with Vim Editor
Which symbol preceding the variable name instructs the shell to extract the value stored or assigned in the variable ?
A $
B #
C @
D %
Correct Answer: Option A
MCQ 221Working with Vim Editor
Should there be no space on either side of the equal to (=) symbol at the time of assigning a value to a variable.
A Yes
B No
C None of these
D All of these
Correct Answer: Option A
MCQ 222Working with Vim Editor
If due to some reasons a space occurs at either side of the equal to (=) symbol, the shell will interpret the string after the space as a ??????
A null
B command
C string
D expression
Correct Answer: Option B
MCQ 223Working with Vim Editor
If due to some reasons a space occurs at either side of the equal to (=) symbol, we would ge ????? output.
A correct
B unexpected
C null
D zero
Correct Answer: Option B
MCQ 224Working with Vim Editor
If we reuse this variable again, the old value stored in it will be ????..