SlideShare a Scribd company logo
I am considering the case where you have multiple name in same file and you want to replace all
of them.
Step1: open terminal in linux operating system
Step2: move to desired file location using below command
Cd /home/beth/project/
Step3: Open desired file in current location
vim 1stqtr and press [enter]
you can see your file content on terminal
step 4: Now go to command mode in VM using below command
press [esc key]
step 5: Now you have to search your old name and replace with new name. For this use below
command structure.
:s/Search/Replace/CommandFlag
Explanation: s -> it is used to command Vi editor that I am going to use search and replace
command
Search-> It is a word which you want to replace
Replace-> It is a word from which you want to replace
Command Flag-> It is command flag which provides extra features like case
sensitive etc.
Say your old name is Ain
:%s/Smith/Oliver/g
To find and replace all occurrences of case insensitive ‘Smith with ‘Oliver, enter:
:%s/Smith/Oliver/gi
To find and replace all occurrences of ‘eth1’ with ‘br1’, but ask for confirmation first, enter:
:%s/Smith/Oliver/gc
Step 6: In the last enter below command to save and exit.
:wq[enter]
Solution
I am considering the case where you have multiple name in same file and you want to replace all
of them.
Step1: open terminal in linux operating system
Step2: move to desired file location using below command
Cd /home/beth/project/
Step3: Open desired file in current location
vim 1stqtr and press [enter]
you can see your file content on terminal
step 4: Now go to command mode in VM using below command
press [esc key]
step 5: Now you have to search your old name and replace with new name. For this use below
command structure.
:s/Search/Replace/CommandFlag
Explanation: s -> it is used to command Vi editor that I am going to use search and replace
command
Search-> It is a word which you want to replace
Replace-> It is a word from which you want to replace
Command Flag-> It is command flag which provides extra features like case
sensitive etc.
Say your old name is Ain
:%s/Smith/Oliver/g
To find and replace all occurrences of case insensitive ‘Smith with ‘Oliver, enter:
:%s/Smith/Oliver/gi
To find and replace all occurrences of ‘eth1’ with ‘br1’, but ask for confirmation first, enter:
:%s/Smith/Oliver/gc
Step 6: In the last enter below command to save and exit.
:wq[enter]

More Related Content

PDF
A. In order to survive inside the body of the host, a pathogen must .pdf
PDF
10) The Correct answer is improvements in learning through hypnosis .pdf
PDF
1.1.The words ‘data’ and ‘information’ are often used as though they.pdf
PDF
1. Osmotic pressure = imRTwhere m = molality of solute, R = molar.pdf
PDF
1-Children are more susceptible to Trichurus species be it male or f.pdf
PDF
Javac code for the manager of the Jeter County softball teamimp.pdf
PDF
1) Mitochondria are known as power houses of cell. The mitochondria .pdf
PDF
the molecule is 2,2-dichloro-ethanol all carbons.pdf
A. In order to survive inside the body of the host, a pathogen must .pdf
10) The Correct answer is improvements in learning through hypnosis .pdf
1.1.The words ‘data’ and ‘information’ are often used as though they.pdf
1. Osmotic pressure = imRTwhere m = molality of solute, R = molar.pdf
1-Children are more susceptible to Trichurus species be it male or f.pdf
Javac code for the manager of the Jeter County softball teamimp.pdf
1) Mitochondria are known as power houses of cell. The mitochondria .pdf
the molecule is 2,2-dichloro-ethanol all carbons.pdf

More from aquadreammail (20)

PDF
Increases. Gases have higher entropy than liquids.pdf
PDF
Simple C++ program to multiply two polynomials#include iostrea.pdf
PDF
design and deliver an confirmation based academic and instruction sy.pdf
PDF
OK, let me try to talk you through this. The arro.pdf
PDF
x=input(Enter the first sequence ); l1=input(Enter the lowe.pdf
PDF
Yes , we can view .Xmzx files are encoded files that take to be un.pdf
PDF
The middle Carbon is the SP hybridized atom.SP hybrid orbitals con.pdf
PDF
The link provided by your teacher is a popular article based on the .pdf
PDF
EPO, hematopoietin, or hemopoietin, is a glycoprotein hormone that c.pdf
PDF
The answer is D) IIA buffer system must contain a weak acid and i.pdf
PDF
c. underwent morphogenesis between the early and late gastrula stage.pdf
PDF
Text Component FeaturesThe JTextComponent class is the foundation .pdf
PDF
SolutionPreparing the T-Accounts for the Above TransactionPrep.pdf
PDF
operating system linux,ubuntu,Mac Geometri.pdf
PDF
NO TILL FARMINGNo-till farming (also called zero tillage or direct.pdf
PDF
Lions use sounds with different intensities, senses such as tough an.pdf
PDF
let R be ringI be a subgroup under additionif I be idealfor a,.pdf
PDF
If we use evaporation or recrystallization, we would only remove the.pdf
PDF
import java.util.Random; public class randomCalls {      .pdf
PDF
Hormone A chemical substance produced in the body by ductless gland.pdf
Increases. Gases have higher entropy than liquids.pdf
Simple C++ program to multiply two polynomials#include iostrea.pdf
design and deliver an confirmation based academic and instruction sy.pdf
OK, let me try to talk you through this. The arro.pdf
x=input(Enter the first sequence ); l1=input(Enter the lowe.pdf
Yes , we can view .Xmzx files are encoded files that take to be un.pdf
The middle Carbon is the SP hybridized atom.SP hybrid orbitals con.pdf
The link provided by your teacher is a popular article based on the .pdf
EPO, hematopoietin, or hemopoietin, is a glycoprotein hormone that c.pdf
The answer is D) IIA buffer system must contain a weak acid and i.pdf
c. underwent morphogenesis between the early and late gastrula stage.pdf
Text Component FeaturesThe JTextComponent class is the foundation .pdf
SolutionPreparing the T-Accounts for the Above TransactionPrep.pdf
operating system linux,ubuntu,Mac Geometri.pdf
NO TILL FARMINGNo-till farming (also called zero tillage or direct.pdf
Lions use sounds with different intensities, senses such as tough an.pdf
let R be ringI be a subgroup under additionif I be idealfor a,.pdf
If we use evaporation or recrystallization, we would only remove the.pdf
import java.util.Random; public class randomCalls {      .pdf
Hormone A chemical substance produced in the body by ductless gland.pdf
Ad

Recently uploaded (20)

PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PDF
Trump Administration's workforce development strategy
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
Weekly quiz Compilation Jan -July 25.pdf
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
What if we spent less time fighting change, and more time building what’s rig...
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
Complications of Minimal Access Surgery at WLH
PDF
Updated Idioms and Phrasal Verbs in English subject
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
master seminar digital applications in india
Orientation - ARALprogram of Deped to the Parents.pptx
Trump Administration's workforce development strategy
Module 4: Burden of Disease Tutorial Slides S2 2025
Final Presentation General Medicine 03-08-2024.pptx
A systematic review of self-coping strategies used by university students to ...
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Weekly quiz Compilation Jan -July 25.pdf
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
What if we spent less time fighting change, and more time building what’s rig...
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
202450812 BayCHI UCSC-SV 20250812 v17.pptx
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Complications of Minimal Access Surgery at WLH
Updated Idioms and Phrasal Verbs in English subject
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
Practical Manual AGRO-233 Principles and Practices of Natural Farming
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
master seminar digital applications in india
Ad

I am considering the case where you have multiple name in same file .pdf

  • 1. I am considering the case where you have multiple name in same file and you want to replace all of them. Step1: open terminal in linux operating system Step2: move to desired file location using below command Cd /home/beth/project/ Step3: Open desired file in current location vim 1stqtr and press [enter] you can see your file content on terminal step 4: Now go to command mode in VM using below command press [esc key] step 5: Now you have to search your old name and replace with new name. For this use below command structure. :s/Search/Replace/CommandFlag Explanation: s -> it is used to command Vi editor that I am going to use search and replace command Search-> It is a word which you want to replace Replace-> It is a word from which you want to replace Command Flag-> It is command flag which provides extra features like case sensitive etc. Say your old name is Ain :%s/Smith/Oliver/g To find and replace all occurrences of case insensitive ‘Smith with ‘Oliver, enter: :%s/Smith/Oliver/gi To find and replace all occurrences of ‘eth1’ with ‘br1’, but ask for confirmation first, enter: :%s/Smith/Oliver/gc Step 6: In the last enter below command to save and exit. :wq[enter] Solution I am considering the case where you have multiple name in same file and you want to replace all of them. Step1: open terminal in linux operating system Step2: move to desired file location using below command Cd /home/beth/project/
  • 2. Step3: Open desired file in current location vim 1stqtr and press [enter] you can see your file content on terminal step 4: Now go to command mode in VM using below command press [esc key] step 5: Now you have to search your old name and replace with new name. For this use below command structure. :s/Search/Replace/CommandFlag Explanation: s -> it is used to command Vi editor that I am going to use search and replace command Search-> It is a word which you want to replace Replace-> It is a word from which you want to replace Command Flag-> It is command flag which provides extra features like case sensitive etc. Say your old name is Ain :%s/Smith/Oliver/g To find and replace all occurrences of case insensitive ‘Smith with ‘Oliver, enter: :%s/Smith/Oliver/gi To find and replace all occurrences of ‘eth1’ with ‘br1’, but ask for confirmation first, enter: :%s/Smith/Oliver/gc Step 6: In the last enter below command to save and exit. :wq[enter]