How do I replace a string on a large file?

I’m having big WordPress SQL dump file on my Ubuntu server which is around 7GB. Since I’m changing domain I need to replace the domain name in the file. I want to know how to do it via command line.

dev.example.com
Needs to replace with
example.com

————————————–
you can use sed with inplace editing

sed -i -e ‘s/dev.example.com/example.com/g’ filename

Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •   
  •  
  •  
  •  
  •  

Prashant Rawal

I’m a freelance full-stack web developer having over 8 years of experience in Wordpress development. I am also Blogger and Affiliate Manager to help people starting their money making blogs using larget affiliate networks.

Leave a Reply

Back to top
powered by proof factor - increase conversions with social proof notifications