对于每天要执行的重复命令,自然放到macro里比较好。
connect 'xxx.xxx.xxx.xxx:22 /ssh /auth=password /user=[username] /passwd=[password]'
wait '$'
sendln 'cd /opt/app/weblogic/'
wait '$'
sendln 'll *.log'
connect 'xxx.xxx.xxx.xxx:22 /ssh /auth=password /user=[username] /passwd=[password]'
wait '$'
sendln 'cd /opt/app/weblogic/'
wait '$'
sendln 'll *.log'
本文介绍了一种通过宏来批量执行远程服务器上特定命令的方法。具体展示了如何使用宏来连接到指定的服务器,并执行如切换目录及列出日志文件等操作。
1万+

被折叠的 条评论
为什么被折叠?



