How do you replace a word in all files in a directory Linux?

Hằng Đoàn

New member
How do you replace a word in all files in a directory Linux?
Answer
sed
  1. i — replace in file. Remove it for a dry run mode;
  2. s/search/replace/g — this is the substitution command. The s stands for substitute (i.e. replace), the g instructs the command to replace all occurrences.
17 авг. 2019 г.
 

Tìm kiếm

Back
Top