find /path/to/directory -type f -exec sed -i 's/old_string/new_string/g' {} +
其中,/path/to/directory
表示需要操作的目录路径;old_string
表示原始字符串;new_string
表示替换后的字符串。该命令会递归地查找并修改目标目录及子目录下的所有文件。
find /path/to/directory -type f -exec sed -i 's/old_string/new_string/g' {} +
其中,/path/to/directory
表示需要操作的目录路径;old_string
表示原始字符串;new_string
表示替换后的字符串。该命令会递归地查找并修改目标目录及子目录下的所有文件。