src: https://www.internalpointers.com/post/linux-find-and-replace-text-multiple-files
How to replace a string of text in multiple files inside a directory. Useful if you need to mass change a string in multiple files to something else to avoid editing each individually.
Enter the directory, for example we will use "/opt/configs" which would contain many files ending in a ".config" extension.
In this example we will want to change the text "{JAVA}" in all of the files ending with a .config extension inside /opt/configs directory to "/opt/java8/bin/java"...grep -RiIl '{JAVA}' *.config | xargs sed -i 's|{JAVA}|/opt/java8/bin/java|g'
If there is no output the strings have been replaced. If there is "no input files" output, that means there were no files that needed replacing.
Популярное
If you run a gaming community, a Teamspeak 3 server is probably a popular choice for you to have...
There's many reasons that you might want to change the directory that your MySQL data is stored...
Disabling root SSH logins and adding an additional sudo user is a good security measure for any...
If you're using Linux Ubuntu / Debian with Java OpenJDK (Spigot, Craftbukkit, Forge, etc.) and...
Add the following to the top of the .htaccess file in your websites document root to force...