Main Menu

Search

LINUX - FInd Command to FInd and Replace Particular String in All files Inside A Directory (SED Command) (How To Doc)

Below is find command to find and replace particular string in all files in current directory.

In this command example we are replacing host1 inside all files which has it in current directory with host2 word.


find ./ -type f -exec sed -i 's/host1/host2/g' {} \;



Products to which Article Applies
All Linux Operating Systems

Article Author: Tarun Boyella

No comments:

Post a Comment