Mass replacing text in file on SSH

Sometimes you need to change some text in all files on the server, for example, change one name to another. If you have static files of files, then one simple command that you need to do on the SSH will help you

find /folder_name/ -type f -exec sed -i 's/old_text/new_text/g' {} +

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
The comment language code.