1.把 10.104.5.71替换成10.104.5.98,
<!-- redis配置 type 1表示游戏库,2表示全局库,3表示角色库 5msg--> <cache> <entry type="1" ip="127.0.0.1" port="6379" index="0"/> <entry type="2" ip="10.104.5.98" port="6379" index="0"/> <entry type="5" ip="10.104.5.98" port="6380" index="0"/> <entry type="3" ip="10.104.5.71" port="6379" index="0"/> <entry type="3" ip="10.104.5.71" port="6380" index="0"/> <entry type="3" ip="10.104.5.71" port="6381" index="0"/> <entry type="3" ip="10.104.5.71" port="6382" index="0"/> <entry type="3" ip="10.104.5.71" port="6383" index="0"/> <entry type="3" ip="10.104.5.71" port="6384" index="0"/> <entry type="3" ip="10.104.5.71" port="6385" index="0"/> <entry type="3" ip="10.104.5.71" port="6386" index="0"/> <entry type="3" ip="10.104.5.71" port="6387" index="0"/> <entry type="3" ip="10.104.5.71" port="6388" index="0"/> <entry type="3" ip="10.104.5.71" port="6389" index="0"/> <entry type="3" ip="10.104.5.71" port="6390" index="0"/> <entry type="3" ip="10.104.5.71" port="6391" index="0"/> <entry type="3" ip="10.104.5.71" port="6392" index="0"/> <entry type="3" ip="10.104.5.71" port="6393" index="0"/> <entry type="3" ip="10.104.5.71" port="6394" index="0"/> </cache>
sed -i 's/10.104.5.71/10.104.5.98/g' game-config.xml
查看文件前100行
head -n 100 file.log
看文件最后100行
tailf -n 100 file.log