使用mac电脑的终端登陆服务器
原创
©著作权归作者所有:来自51CTO博客作者拔山河的原创作品,请联系作者获取转载授权,否则将追究法律责任
打开终端,执行命令ssh -p 18 xxx@log1.45.cn->输入密码->查询日志
Last login: Tue Jul 12 10:42:55 on ttys004
laojia:~ jiaguoshang$ ssh -p 18 xxx@log1.45.cn
xxx@log1.45.cn's password:
Last login: Thu Jun 30 09:23:27 2016 from 183.134.103.169
Welcome to aliyun Elastic Compute Service!
[jiaguoshang@caocaoapp ~]$ pwd
/home/jiaguoshang
[jiaguoshang@caocaoapp123232' /opt/c1/message.log"
【用户jiaguoshang正在执行脚本[grep '123232' /opt/clog/message.log]】
========Searching at app01=======
2016/07/12 10:35:00,068 http-bio-8080-exec-17 INFO message -
常用语句:
wlog app "ls -ltr /opt/c1 | tail -1"
wlog app "ls -ltr /opt | tail -1"
wlog app "ls -ltr /opt/c1-2 | tail -1"
wlog app "grep '1823587' /opt/c1-2/common.log"
wlog app "grep ' 1823587' /opt/c1/message.log"
wlog app "grep '120.167408' /opt/c1/message.log"