Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

Linux command line search and replace string


> grep -rl "old string" . | xargs sed -i 's/old string/new string/g'

Comment

Linux command line search and replace string in all files

 String Find and replace (folders/sub folders)
> grep -rl "old string" . | xargs sed -i 's/old string/new string/g'

 URL Find and replace  (folders/sub folders) 
> grep -rl "www.google.com" . | xargs sed -i 's/www.google.com/www.yahoo.com/g'
Comment

PREVIOUS NEXT
Code Example
Shell :: sed recursive replace 
Shell :: reconnaissance in cyber security 
Shell :: Updates were rejected because the remote contains work that you do 
Shell :: notepad++ linux 
Shell :: kubectl install ubuntu 20.04 
Shell :: install trello for linux 
Shell :: nodemon command not found 
Shell :: Yarn .gitignore for not Zero Installs 
Shell :: exit git log 
Shell :: install wget debian 
Shell :: install bin on ubuntu 
Shell :: kubectl copy secret namespace 
Shell :: conda install pyvista 
Shell :: see all ADS in a file 
Shell :: see traffic github grepper 
Shell :: awk only first six letters 
Shell :: install Scout in ubuntu 
Shell :: lf will be replaced by crlf 
Shell :: bash if file contains string 
Shell :: force delete a folder in linux 
Shell :: extract tar gz overwrite 
Shell :: git stash apply 
Shell :: push an existing github repository 
Shell :: how to find factor in linux cmd 
Shell :: github push master 
Shell :: how to uninstall cudnn ubuntu 
Shell :: command to check recent commit 
Shell :: remove fish shell 
Shell :: update brew 
Shell :: show wifi password linux 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =