In linux, there are only two methods for replacing keywords with multiple files: The Mahuinan method, the Sumly method, and the 30 t method: 1. Mahuinan method: You can use the sed command to replace strings in multiple files in batches. Sed-I "s/original string/New String/g" 'grep original string-rl directory 'For example: replace/home/gbase/table_space in the. txt file under/root/tm/directory with/home/hj/gbase/table_space and run the following command: sed-I "s/home \/gbase \/table_space/\/home \/hj \/gbase \/table_space/g" 'grep home \/gbase \/table_space-rl /root/tm /*. txt 'This is currently the simplest string replacement command in linux! The specific format of www.2cto.com is as follows: sed-I "s/oldString/newString/g" 'grep oldString-rl/path' instance code: sed-I "s/size/Sun/month/g" 'grep size-rl/usr/aa 'sed-I "s/size/Sun/month/g "' grep size-rl. /'II. Run the command in the Sumly method: perl-p-I-e "s/China/Sumly/g"/www /*. htm/www /*. in txt, replace "China" in all htm and txt files in the www folder with "Sumly". 3. Execute the following command in 30 t mode: www.2cto.com perl-pi-e's | baidu | 30T | g''find/www-type F' indicates all the files in the www folder, regardless of the extension, replace all "baidu" with "30T" // sed-I "s/JSON/JSONYH/g" 'grep JSON-rl .. /src 'sed-I "s/CONFIG: pad/CONFIG: pad_tmp/g" 'grep CONFIG: pad-rl. /'gameconfigpaywindow author tianmaotalk